DirectoryService / Client / create_microsoft_ad

create_microsoft_ad#

DirectoryService.Client.create_microsoft_ad(**kwargs)#

Creates a Microsoft AD directory in the Amazon Web Services Cloud. For more information, see Managed Microsoft AD in the Directory Service Admin Guide .

Before you call CreateMicrosoftAD , ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.

See also: AWS API Documentation

Request Syntax

response = client.create_microsoft_ad(
    Name='string',
    ShortName='string',
    Password='string',
    Description='string',
    VpcSettings={
        'VpcId': 'string',
        'SubnetIds': [
            'string',
        ]
    },
    Edition='Enterprise'|'Standard',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The fully qualified domain name for the Managed Microsoft AD directory, such as corp.example.com . This name will resolve inside your VPC only. It does not need to be publicly resolvable.

  • ShortName (string) – The NetBIOS name for your domain, such as CORP . If you don’t specify a NetBIOS name, it will default to the first part of your directory DNS. For example, CORP for the directory DNS corp.example.com .

  • Password (string) –

    [REQUIRED]

    The password for the default administrative user named Admin .

    If you need to change the password for the administrator account, you can use the ResetUserPassword API call.

  • Description (string) – A description for the directory. This label will appear on the Amazon Web Services console Directory Details page after the directory is created.

  • VpcSettings (dict) –

    [REQUIRED]

    Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

    • VpcId (string) – [REQUIRED]

      The identifier of the VPC in which to create the directory.

    • SubnetIds (list) – [REQUIRED]

      The identifiers of the subnets for the directory servers. The two subnets must be in different Availability Zones. Directory Service creates a directory server and a DNS server in each of these subnets.

      • (string) –

  • Edition (string) – Managed Microsoft AD is available in two editions: Standard and Enterprise . Enterprise is the default.

  • Tags (list) –

    The tags to be assigned to the Managed Microsoft AD directory.

    • (dict) –

      Metadata assigned to a directory consisting of a key-value pair.

      • Key (string) – [REQUIRED]

        Required name of the tag. The string value can be Unicode characters and cannot be prefixed with “aws:”. The string can contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

      • Value (string) – [REQUIRED]

        The optional value of the tag. The string value can be Unicode characters. The string can contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

Return type:

dict

Returns:

Response Syntax

{
    'DirectoryId': 'string'
}

Response Structure

  • (dict) –

    Result of a CreateMicrosoftAD request.

    • DirectoryId (string) –

      The identifier of the directory that was created.

Exceptions

  • DirectoryService.Client.exceptions.DirectoryLimitExceededException

  • DirectoryService.Client.exceptions.InvalidParameterException

  • DirectoryService.Client.exceptions.ClientException

  • DirectoryService.Client.exceptions.ServiceException

  • DirectoryService.Client.exceptions.UnsupportedOperationException