AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Organizations::Types::CreatePolicyRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing CreatePolicyRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  content: "PolicyContent", # required
  description: "PolicyDescription", # required
  name: "PolicyName", # required
  type: "SERVICE_CONTROL_POLICY", # required, accepts SERVICE_CONTROL_POLICY, TAG_POLICY, BACKUP_POLICY, AISERVICES_OPT_OUT_POLICY
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
}

Instance Attribute Summary collapse

Instance Attribute Details

#contentString

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.

Returns:

  • (String)

    The policy text content to add to the new policy.

#descriptionString

An optional description to assign to the policy.

Returns:

  • (String)

    An optional description to assign to the policy.

#nameString

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.

Returns:

  • (String)

    The friendly name to assign to the policy.

#tagsArray<Types::Tag>

A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can\'t set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.

Returns:

  • (Array<Types::Tag>)

    A list of tags that you want to attach to the newly created policy.

#typeString

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

Returns:

  • (String)

    The type of policy to create.