CmdID

CmdID / aws / aws iam

aws iam set-default-policy-version

Sets the specified version of the specified policy as the policy's default (operative) version. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To set the specified version of the specified policy as the policy's default version.

The following set-default-policy-version example sets the v2 version of the policy whose ARN is arn:aws:iam::123456789012:policy/MyPolicy as the default active version.

aws iam set-default-policy-version --policy-arn arn:aws:iam::123456789012:policy/MyPolicy --version-id v2Identify
--policy-arnThe Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
--version-idThe version of the policy to set as the default (operative) version.

This command produces no output.

For more information, see Policies and permissions in IAM in the AWS IAM User Guide.

Options

2 in the AWS CLI reference
--policy-arnThe Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
--version-idThe version of the policy to set as the default (operative) version.