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
9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 | |