paws.management (version 0.1.0)

organizations_create_organizational_unit: Creates an organizational unit (OU) within a root or parent OU

Description

Creates an organizational unit (OU) within a root or parent OU. An OU is a container for accounts that enables you to organize your accounts to apply policies according to your business requirements. The number of levels deep that you can nest OUs is dependent upon the policy types enabled for that root. For service control policies, the limit is five.

Usage

organizations_create_organizational_unit(ParentId, Name)

Arguments

ParentId

[required] The unique identifier (ID) of the parent root or OU in which you want to create the new OU.

The regex pattern for a parent ID string requires one of the following:

  • Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits.

  • Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.

Name

[required] The friendly name to assign to the new OU.

Request syntax

svc$create_organizational_unit(
  ParentId = "string",
  Name = "string"
)

Details

For more information about OUs, see Managing Organizational Units in the AWS Organizations User Guide.

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 an OU that is named
# AccountingOU. The new OU is directly under the root.:
# 
# 
# }
# NOT RUN {
svc$create_organizational_unit(
  Name = "AccountingOU",
  ParentId = "r-examplerootid111"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace