connect_directory

connect_directory(**kwargs)

Creates an AD Connector to connect to a self-managed directory.

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

See also: AWS API Documentation

Request Syntax

response = client.connect_directory(
    Name='string',
    ShortName='string',
    Password='string',
    Description='string',
    Size='Small'|'Large',
    ConnectSettings={
        'VpcId': 'string',
        'SubnetIds': [
            'string',
        ],
        'CustomerDnsIps': [
            'string',
        ],
        'CustomerUserName': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • Name (string) --

    [REQUIRED]

    The fully qualified name of your self-managed directory, such as corp.example.com .

  • ShortName (string) -- The NetBIOS name of your self-managed directory, such as CORP .
  • Password (string) --

    [REQUIRED]

    The password for your self-managed user account.

  • Description (string) -- A description for the directory.
  • Size (string) --

    [REQUIRED]

    The size of the directory.

  • ConnectSettings (dict) --

    [REQUIRED]

    A DirectoryConnectSettings object that contains additional information for the operation.

    • VpcId (string) -- [REQUIRED]

      The identifier of the VPC in which the AD Connector is created.

    • SubnetIds (list) -- [REQUIRED]

      A list of subnet identifiers in the VPC in which the AD Connector is created.

      • (string) --
    • CustomerDnsIps (list) -- [REQUIRED]

      A list of one or more IP addresses of DNS servers or domain controllers in your self-managed directory.

      • (string) --
    • CustomerUserName (string) -- [REQUIRED]

      The user name of an account in your self-managed directory that is used to connect to the directory. This account must have the following permissions:

      • Read users and groups
      • Create computer objects
      • Join computers to the domain
  • Tags (list) --

    The tags to be assigned to AD Connector.

    • (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) --

    Contains the results of the ConnectDirectory operation.

    • DirectoryId (string) --

      The identifier of the new directory.

Exceptions

  • DirectoryService.Client.exceptions.DirectoryLimitExceededException
  • DirectoryService.Client.exceptions.InvalidParameterException
  • DirectoryService.Client.exceptions.ClientException
  • DirectoryService.Client.exceptions.ServiceException