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
9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 | |