paws.security.identity (version 0.1.0)

iam_create_policy: Creates a new managed policy for your AWS account

Description

Creates a new managed policy for your AWS account.

Usage

iam_create_policy(PolicyName, Path, PolicyDocument, Description)

Arguments

PolicyName

[required] The friendly name of the policy.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \_+=,.@-

Path

The path for the policy.

For more information about paths, see IAM Identifiers in the IAM User Guide.

This parameter is optional. If it is not included, it defaults to a slash (/).

This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (U+0021) through the DEL character (U+007F), including most punctuation characters, digits, and upper and lowercased letters.

PolicyDocument

[required] The JSON policy document that you want to use as the content for the new 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)

Description

A friendly description of the policy.

Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."

The policy description is immutable. After a value is assigned, it cannot be changed.

Request syntax

svc$create_policy(
  PolicyName = "string",
  Path = "string",
  PolicyDocument = "string",
  Description = "string"
)

Details

This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's default version. For more information about policy versions, see Versioning for Managed Policies in the IAM User Guide.

For more information about managed policies in general, see Managed Policies and Inline Policies in the IAM User Guide.