modify_document_permission
async
¶
modify_document_permission(
name: DocumentName,
permission_type: DocumentPermissionType,
*,
config_overrides: Optional[AsyncSSMClientConfig] = 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/async_ssm.py
9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 | |