libZSservicesZSamazonka-organizationsZSamazonka-organizations
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Organizations.CreateOrganizationalUnit

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.

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

If the request includes tags, then the requester must have the organizations:TagResource permission.

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

Synopsis

Creating a Request

data CreateOrganizationalUnit Source #

See: newCreateOrganizationalUnit smart constructor.

Constructors

CreateOrganizationalUnit' 

Fields

  • tags :: Maybe [Tag]

    A list of tags that you want to attach to the newly created OU. 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 an OU, then the entire request fails and the OU is not created.

  • parentId :: Text

    The unique identifier (ID) of the parent root or OU that you want to create the new OU in.

    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 lowercase letters or digits.
    • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  • name :: Text

    The friendly name to assign to the new OU.

Instances

Instances details
Eq CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Read CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Show CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Generic CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Associated Types

type Rep CreateOrganizationalUnit :: Type -> Type #

NFData CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Hashable CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

ToJSON CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

AWSRequest CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

ToHeaders CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

ToPath CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

ToQuery CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

type Rep CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

type Rep CreateOrganizationalUnit = D1 ('MetaData "CreateOrganizationalUnit" "Amazonka.Organizations.CreateOrganizationalUnit" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" 'False) (C1 ('MetaCons "CreateOrganizationalUnit'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "parentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

newCreateOrganizationalUnit Source #

Create a value of CreateOrganizationalUnit with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:tags:CreateOrganizationalUnit', createOrganizationalUnit_tags - A list of tags that you want to attach to the newly created OU. 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 an OU, then the entire request fails and the OU is not created.

$sel:parentId:CreateOrganizationalUnit', createOrganizationalUnit_parentId - The unique identifier (ID) of the parent root or OU that you want to create the new OU in.

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 lowercase letters or digits.
  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

$sel:name:CreateOrganizationalUnit', createOrganizationalUnit_name - The friendly name to assign to the new OU.

Request Lenses

createOrganizationalUnit_tags :: Lens' CreateOrganizationalUnit (Maybe [Tag]) Source #

A list of tags that you want to attach to the newly created OU. 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 an OU, then the entire request fails and the OU is not created.

createOrganizationalUnit_parentId :: Lens' CreateOrganizationalUnit Text Source #

The unique identifier (ID) of the parent root or OU that you want to create the new OU in.

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 lowercase letters or digits.
  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

createOrganizationalUnit_name :: Lens' CreateOrganizationalUnit Text Source #

The friendly name to assign to the new OU.

Destructuring the Response

data CreateOrganizationalUnitResponse Source #

See: newCreateOrganizationalUnitResponse smart constructor.

Constructors

CreateOrganizationalUnitResponse' 

Fields

Instances

Instances details
Eq CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Read CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Show CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Generic CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Associated Types

type Rep CreateOrganizationalUnitResponse :: Type -> Type #

NFData CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

type Rep CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

type Rep CreateOrganizationalUnitResponse = D1 ('MetaData "CreateOrganizationalUnitResponse" "Amazonka.Organizations.CreateOrganizationalUnit" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" 'False) (C1 ('MetaCons "CreateOrganizationalUnitResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "organizationalUnit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OrganizationalUnit)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateOrganizationalUnitResponse Source #

Create a value of CreateOrganizationalUnitResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:organizationalUnit:CreateOrganizationalUnitResponse', createOrganizationalUnitResponse_organizationalUnit - A structure that contains details about the newly created OU.

$sel:httpStatus:CreateOrganizationalUnitResponse', createOrganizationalUnitResponse_httpStatus - The response's http status code.

Response Lenses