Shares a Systems Manager document publicly or privately. If you share a document privately, you must specify the AWS user account IDs for those people who can use the document. If you share a document publicly, you must specify All as the account ID.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
modify-document-permission
--name <value>
--permission-type <value>
[--account-ids-to-add <value>]
[--account-ids-to-remove <value>]
[--shared-document-version <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]
--name
(string)
The name of the document that you want to share.
--permission-type
(string)
The permission type for the document. The permission type can be Share .
Possible values:
Share
--account-ids-to-add
(list)
The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs or All .
(string)
Syntax:
"string" "string" ...
--account-ids-to-remove
(list)
The AWS user accounts that should no longer have access to the document. The AWS user account can either be a group of account IDs or All . This action has a higher priority than AccountIdsToAdd . If you specify an account ID to add and the same ID to remove, the system removes access to the document.
(string)
Syntax:
"string" "string" ...
--shared-document-version
(string)
(Optional) The version of the document to share. If it’s not specified, the system choose the
Default
version to share.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
--cli-auto-prompt
(boolean)
Automatically prompt for CLI input parameters.
See ‘aws help’ for descriptions of global parameters.
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.
None