Learn Idem

Learn Idem

Powered by Idem Project

aws.organizations.organization_unit

**Autogenerated function**

Deletes an organizational unit (OU) from a root or another OU. You must first remove all accounts
and child OUs from the OU that you want to delete.This operation can be called only from the
organization's management account.

Args:
    name(Text): Name of the resource.
    resource_id(Text): AWS Organization Unit ID to identify the resource

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        resource_is_absent:
          aws.organizations.organization_unit.absent:
            - name: ou-id1011
            - resource_id: ou-examplerootid111-exampleouid111
**Autogenerated function**

Lists the organizational units (OUs) in a parent organizational unit or root.

Idem does not support passing arguments to the describe function as of today , hence describe organizational unit
will describe all the organizational unit one level under the root of the organization.
In future if Idem starts supporting input arguments , we can pass any parent_id and this function will list
all organizational units one level under the parent.


Returns:
    Dict[str, Any]


Examples:

    .. code-block:: bash

        $ idem describe aws.organizations.organization_unit
**Autogenerated function**

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.

Args:
    name(Text): Name of the resource.
    parent_id(Text): The unique identifier (ID) of the parent root or OU that you
                              want to create the new OU in.
    tags(List or Dict, optional): list of tags in the format of [{"Key": tag-key, "Value": tag-value}] or dict in the format of
                                  {tag-key: tag-value}
    resource_id(Text, Optional): AWS Organization Unit ID to identify the resource


Request Syntax:
    [org-id]:
      aws.organizations.organization_unit.present:
      - parent_id: 'string'
      - name: 'string'
      - tags:
        - Key: 'string'
          Value: 'string'
      - resource_id: 'string'

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        ou-examplerootid111-exampleouid111:
          aws.organizations.organization_unit.present:
            - parent_id: ou-01919
            - name: ou-new
            - tags:
                - Key: org
                  Value: guardrails
            - resource_id: ou-examplerootid111-exampleouid111

Full plugin documentation is available on the Idem documentation site - aws.organizations.organization_unit .

Last updated on 20 Sep 2022
 Edit on GitHub