paws.security.identity (version 0.1.0)

iam_create_policy_version: Creates a new version of the specified managed policy

Description

Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.

Usage

iam_create_policy_version(PolicyArn, PolicyDocument, SetAsDefault)

Arguments

PolicyArn

[required] The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version.

For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

PolicyDocument

[required] The JSON policy document that you want to use as the content for this new version of the policy.

The regex pattern used to validate this parameter is a string of characters consisting of the following:

  • Any printable ASCII character ranging from the space character (U+0020) through the end of the ASCII character range

  • The printable characters in the Basic Latin and Latin-1 Supplement character set (through U+00FF)

  • The special characters tab (U+0009), line feed (U+000A), and carriage return (U+000D)

SetAsDefault

Specifies whether to set this version as the policy's default version.

When this parameter is true, the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to.

For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide.

Request syntax

svc$create_policy_version(
  PolicyArn = "string",
  PolicyDocument = "string",
  SetAsDefault = TRUE|FALSE
)

Details

Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached.

For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide.