document_permissions
Creates, updates, deletes, gets or lists a document_permissions resource.
Overview
| Name | document_permissions |
| Type | Resource |
| Id | aws.ssm.document_permissions |
Fields
The following fields are returned by SELECT queries:
- describe_document_permission
| Name | Datatype | Description |
|---|---|---|
account_ids | array | The 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_list | array | A list of Amazon Web Services accounts where the current document is shared and the version shared with each account. |
next_token | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_document_permission | select | region | 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). | |
modify_document_permission | update | region, Name, PermissionType | 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
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_document_permission
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
- modify_document_permission
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;