:doc:`Organizations <../../organizations>` / Client / describe_organizational_unit

****************************
describe_organizational_unit
****************************



.. py:method:: Organizations.Client.describe_organizational_unit(**kwargs)

  

  Retrieves information about an organizational unit (OU).

   

  You can only call this operation from the management account or a member account that is a delegated administrator.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit>`_  


  **Request Syntax**
  ::

    response = client.describe_organizational_unit(
        OrganizationalUnitId='string'
    )
    
  :type OrganizationalUnitId: string
  :param OrganizationalUnitId: **[REQUIRED]** 

    ID for the organizational unit that you want details about. You can get the ID from the  ListOrganizationalUnitsForParent operation.

     

    The `regex pattern <http://wikipedia.org/wiki/regex>`__ for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'OrganizationalUnit': {
              'Id': 'string',
              'Arn': 'string',
              'Name': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **OrganizationalUnit** *(dict) --* 

        A structure that contains details about the specified OU.

        
        

        - **Id** *(string) --* 

          The unique identifier (ID) associated with this OU. The ID is unique to the organization only.

           

          The `regex pattern <http://wikipedia.org/wiki/regex>`__ for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

          
        

        - **Arn** *(string) --* 

          The Amazon Resource Name (ARN) of this OU.

           

          For more information about ARNs in Organizations, see `ARN Formats Supported by Organizations <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies>`__ in the *Amazon Web Services Service Authorization Reference*.

          
        

        - **Name** *(string) --* 

          The friendly name of this OU.

           

          The `regex pattern <http://wikipedia.org/wiki/regex>`__ that is used to validate this parameter is a string of any of the characters in the ASCII character range.

          
    
  
  **Exceptions**
  
  *   :py:class:`Organizations.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Organizations.Client.exceptions.AWSOrganizationsNotInUseException`

  
  *   :py:class:`Organizations.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Organizations.Client.exceptions.OrganizationalUnitNotFoundException`

  
  *   :py:class:`Organizations.Client.exceptions.ServiceException`

  
  *   :py:class:`Organizations.Client.exceptions.TooManyRequestsException`

  

  **Examples**

  The following example shows how to request details about an OU:/n/n
  ::

    response = client.describe_organizational_unit(
        OrganizationalUnitId='ou-examplerootid111-exampleouid111',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'OrganizationalUnit': {
            'Arn': 'arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111',
            'Id': 'ou-examplerootid111-exampleouid111',
            'Name': 'Accounting Group',
        },
        'ResponseMetadata': {
            '...': '...',
        },
    }

  