DirectoryService.Client.
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'
},
]
)
[REQUIRED]
The fully qualified name of your self-managed directory, such as corp.example.com
.
CORP
.[REQUIRED]
The password for your self-managed user account.
[REQUIRED]
The size of the directory.
[REQUIRED]
A DirectoryConnectSettings object that contains additional information for the operation.
The identifier of the VPC in which the AD Connector is created.
A list of subnet identifiers in the VPC in which the AD Connector is created.
A list of one or more IP addresses of DNS servers or domain controllers in your self-managed directory.
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:
The tags to be assigned to AD Connector.
Metadata assigned to a directory consisting of a key-value pair.
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}_.:/=+\-]*)$").
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}_.:/=+\-]*)$").
dict
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