Learn R Programming

paws.management (version 0.1.9)

organizations_create_policy: Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account

Description

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account.

Usage

organizations_create_policy(Content, Description, Name, Type)

Arguments

Content

[required] The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in the Type parameter.

Description

[required] An optional description to assign to the policy.

Name

[required] The friendly name to assign to the policy.

The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

Type

[required] The type of policy to create. You can specify one of the following values:

Request syntax

svc$create_policy(
  Content = "string",
  Description = "string",
  Name = "string",
  Type = "SERVICE_CONTROL_POLICY"|"TAG_POLICY"|"BACKUP_POLICY"|"AISERVICES_OPT_OUT_POLICY"
)

Details

For more information about policies and their use, see Managing Organization Policies.

This operation can be called only from the organization\'s master account.

Examples

Run this code
# NOT RUN {
# The following example shows how to create a service control policy (SCP)
# that is named AllowAllS3Actions. The JSON string in the content
# parameter specifies the content in the policy. The parameter string is
# escaped with backslashes to ensure that the embedded double quotes in
# the JSON policy are treated as literals in the parameter, which itself
# is surrounded by double quotes:
# 
# 
svc$create_policy(
  Content = "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":{\\\"Effect\\\":...",
  Description = "Enables admins of attached accounts to delegate all S3 permissions",
  Name = "AllowAllS3Actions",
  Type = "SERVICE_CONTROL_POLICY"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab