AWS Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see
AWS Systems Manager Change Manager availability change.
Use ModifyDocumentPermission with a CLI
The following code examples show how to use ModifyDocumentPermission.
- CLI
-
- AWS CLI
-
To modify document permissions
The following modify-document-permission example shares a Systems Manager document publicly.
aws ssm modify-document-permission \
--name "Example" \
--permission-type "Share" \
--account-ids-to-add "All"
This command produces no output.
For more information, see Share a Systems Manager Document in the AWS Systems Manager User Guide.
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example adds "share" permissions to all accounts for a document. There is no output if the command succeeds.
Edit-SSMDocumentPermission -Name "RunShellScript" -PermissionType "Share" -AccountIdsToAdd all
Example 2: This example adds "share" permissions to a specific account for a document. There is no output if the command succeeds.
Edit-SSMDocumentPermission -Name "RunShellScriptNew" -PermissionType "Share" -AccountIdsToAdd "123456789012"
- Tools for PowerShell V5
-
Example 1: This example adds "share" permissions to all accounts for a document. There is no output if the command succeeds.
Edit-SSMDocumentPermission -Name "RunShellScript" -PermissionType "Share" -AccountIdsToAdd all
Example 2: This example adds "share" permissions to a specific account for a document. There is no output if the command succeeds.
Edit-SSMDocumentPermission -Name "RunShellScriptNew" -PermissionType "Share" -AccountIdsToAdd "123456789012"
For a complete list of AWS SDK developer guides and code examples, see
Using this service with an AWS SDK.
This topic also includes information about getting started and details about previous SDK versions.