amazonka-organizations-2.0: Amazon Organizations SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 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 Organizations resources in the 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
ToJSON 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

AWSRequest 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 #

Read CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Show CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

NFData CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Eq CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Hashable CreateOrganizationalUnit Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

type AWSResponse 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" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" '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))))

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 Organizations resources in the 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.

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 Organizations resources in the 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
Generic CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Associated Types

type Rep CreateOrganizationalUnitResponse :: Type -> Type #

Read CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Show CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

NFData CreateOrganizationalUnitResponse Source # 
Instance details

Defined in Amazonka.Organizations.CreateOrganizationalUnit

Eq 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" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" '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