modify_document_permission
¶
modify_document_permission(
name: DocumentName,
permission_type: DocumentPermissionType,
*,
config_overrides: Optional[SSMClientConfig] = None,
account_ids_to_add: Optional[AccountIdList] = None,
account_ids_to_remove: Optional[AccountIdList] = None,
shared_document_version: Optional[SharedDocumentVersion] = None,
) -> ModifyDocumentPermissionResponse
Shares a Amazon Web Services Systems Manager document (SSM document)publicly or privately. If you share a document privately, you must specify the Amazon Web Services user IDs for those people who can use the document. If you share a document publicly, you must specify All as the account ID.
Parameters:
-
name(DocumentName) –The name of the document that you want to share.
-
permission_type(DocumentPermissionType) –The permission type for the document. The permission type can be Share.
-
account_ids_to_add(Optional[AccountIdList], default:None) –The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or All. You must specify a value for this parameter or the
AccountIdsToRemoveparameter. -
account_ids_to_remove(Optional[AccountIdList], default:None) –The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or All. This action has a higher priority than
AccountIdsToAdd. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or theAccountIdsToAddparameter. -
shared_document_version(Optional[SharedDocumentVersion], default:None) –(Optional) The version of the document to share. If it isn't specified, the system choose the
Defaultversion to share.
Raises:
-
DocumentLimitExceeded–You can have at most 500 active SSM documents.
-
DocumentPermissionLimit–The document can't be shared with more Amazon Web Services accounts. You can specify a maximum of 20 accounts per API operation to share a private document.
By default, you can share a private document with a maximum of 1,000 accounts and publicly share up to five documents.
If you need to increase the quota for privately or publicly shared Systems Manager documents, contact Amazon Web Services Support.
-
InternalServerError–An error occurred on the server side.
-
InvalidDocument–The specified SSM document doesn't exist.
-
InvalidPermissionType–The permission type isn't supported. Share is the only supported permission type.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 | |