DataZone / Client / create_domain_unit

create_domain_unit#

DataZone.Client.create_domain_unit(**kwargs)#

Creates a domain unit in Amazon DataZone.

See also: AWS API Documentation

Request Syntax

response = client.create_domain_unit(
    clientToken='string',
    description='string',
    domainIdentifier='string',
    name='string',
    parentDomainUnitIdentifier='string'
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  • description (string) – The description of the domain unit.

  • domainIdentifier (string) –

    [REQUIRED]

    The ID of the domain where you want to crate a domain unit.

  • name (string) –

    [REQUIRED]

    The name of the domain unit.

  • parentDomainUnitIdentifier (string) –

    [REQUIRED]

    The ID of the parent domain unit.

Return type:

dict

Returns:

Response Syntax

{
    'ancestorDomainUnitIds': [
        'string',
    ],
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'description': 'string',
    'domainId': 'string',
    'id': 'string',
    'name': 'string',
    'owners': [
        {
            'group': {
                'groupId': 'string'
            },
            'user': {
                'userId': 'string'
            }
        },
    ],
    'parentDomainUnitId': 'string'
}

Response Structure

  • (dict) –

    • ancestorDomainUnitIds (list) –

      The IDs of the ancestor domain units.

      • (string) –

    • createdAt (datetime) –

      The timestamp at which the domain unit was created.

    • createdBy (string) –

      The user who created the domain unit.

    • description (string) –

      The description of the domain unit.

    • domainId (string) –

      The ID of the domain where the domain unit was created.

    • id (string) –

      The ID of the domain unit.

    • name (string) –

      The name of the domain unit.

    • owners (list) –

      The owners of the domain unit.

      • (dict) –

        The properties of the domain unit owner.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: group, user. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • group (dict) –

          Indicates that the domain unit owner is a group.

          • groupId (string) –

            The ID of the domain unit group.

        • user (dict) –

          Indicates that the domain unit owner is a user.

          • userId (string) –

            The ID of teh domain unit user.

    • parentDomainUnitId (string) –

      The ID of the parent domain unit.

Exceptions

  • DataZone.Client.exceptions.InternalServerException

  • DataZone.Client.exceptions.AccessDeniedException

  • DataZone.Client.exceptions.ThrottlingException

  • DataZone.Client.exceptions.ServiceQuotaExceededException

  • DataZone.Client.exceptions.ConflictException

  • DataZone.Client.exceptions.ValidationException

  • DataZone.Client.exceptions.UnauthorizedException