Skip to content

SSMClient.modify_document_permission

rboto-ssm==0.4.0 · Service index · Types

Model summary (excerpt): 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.

Install and imports

python -m pip install "rboto[ssm]==0.4.0"
from rboto import SSMClient
from collections.abc import Sequence
from rboto_ssm.types import (
    DocumentPermissionType,
    ModifyDocumentPermissionOutput,
)

Signature

async def modify_document_permission(
    *,
    name: str,
    permission_type: DocumentPermissionType,
    account_ids_to_add: Sequence[str] | None = None,
    account_ids_to_remove: Sequence[str] | None = None,
    shared_document_version: str | None = None,
) -> ModifyDocumentPermissionOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
name Yes The name of the document that you want to share.
permission_type Yes The permission type for the document. The permission type can be Share .
account_ids_to_add No 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 AccountIdsToRemove parameter.
account_ids_to_remove No 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 the AccountIdsToAdd parameter.
shared_document_version No (Optional) The version of the document to share. If it isn't specified, the system choose the Default version to share.

Output

ModifyDocumentPermissionOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

No fields.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

DocumentPermissionType, ModifyDocumentPermissionOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_ssm.exceptions:

DocumentLimitExceededError, DocumentPermissionLimitError, InternalServerError, InvalidDocumentError, InvalidPermissionTypeError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model