Skip to main content

document_permissions

Creates, updates, deletes, gets or lists a document_permissions resource.

Overview

Namedocument_permissions
TypeResource
Idaws.ssm.document_permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idsarrayThe account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or all.
account_sharing_info_listarrayA list of Amazon Web Services accounts where the current document is shared and the version shared with each account.
next_tokenstringThe token for the next set of items to return. Use this token to get the next set of results.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_document_permissionselectregionDescribes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's Amazon Web Services account ID) or publicly (All).
modify_document_permissionupdateregion, Name, PermissionTypeShares 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

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's Amazon Web Services account ID) or publicly (All).

SELECT
account_ids,
account_sharing_info_list,
next_token
FROM aws.ssm.document_permissions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

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.

UPDATE aws.ssm.document_permissions
SET
Name = '{{ Name }}',
PermissionType = '{{ PermissionType }}',
AccountIdsToAdd = '{{ AccountIdsToAdd }}',
AccountIdsToRemove = '{{ AccountIdsToRemove }}',
SharedDocumentVersion = '{{ SharedDocumentVersion }}'
WHERE
region = '{{ region }}' --required
AND Name = '{{ Name }}' --required
AND PermissionType = '{{ PermissionType }}' --required;