You can call this operation to create an AD directory.

Description

AD directories are used to connect to enterprise AD systems and are suitable for large-scale desktop deployments. You are charged for directories connected to enterprise AD systems. For more information, see Billing overview.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateADConnectorDirectory

The operation that you want to perform. Set the value to CreateADConnectorDirectory.

DomainName String Yes corp.example.com

The fully qualified domain name (FQDN) of the enterprise AD system. The value must include both the hostname and the domain name. Example: corp.example.com.

Each domain name can be registered only once.

DomainUserName String Yes sAMAccountName

The username of the domain administrator. The username must be 1 to 64 characters in length.

DomainPassword String Yes testPassword

The password of the domain administrator. The password must be 1 to 64 characters in length.

RegionId String Yes cn-hangzhou

The region ID of the AD directory.

DnsAddress.N RepeatList Yes 127.0.**.**

The IP address of the DNS server of the enterprise AD system. You can specify only one IP address. Make sure that the specified IP address is accessible in the network of the selected vSwitch.

VSwitchId.N RepeatList Yes vsw-bp19ocz3erfx15uon****

The ID of vSwitch N. You can specify only one vSwitch ID.

DirectoryName String No testDirectoryName

The name of the directory. The name must be 2 to 255 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.

This parameter is empty by default.

EnableAdminAccess Boolean No true

Specifies whether to grant the permissions of the local administrator to the desktop users. Default value: true.

DesktopAccessType String No Internet

The method used to connect to the cloud desktop. Valid values:

  • Internet: connects to the cloud desktop over the Internet.
  • VPC: connects to the cloud desktop over VPCs.
  • Any: connects to the cloud desktop over the Internet or VPCs.

    Default value: Internet.

SubDomainDnsAddress.N RepeatList No 127.0.**.**

The DNS address of the enterprise AD subdomain.

If you specify SubDomainName but not this parameter, the DNS address of the subdomain is considered to be the same as that of the parent domain.

SubDomainName String No child.example.com

The FQDN of the enterprise AD subdomain. The value must include both the hostname and the domain name. Example: child.example.com.

Response parameters

Parameter Type Example Description
AdConnectors Array of AdConnector

Details of the AD connectors.

Address String 127.0.**.**

The IP address of the AD connector.

DirectoryId String cn-hangzhou+dir-gx2x1dhsmu52rd****

The ID of the AD directory.

RequestId String 3FE99D5E-93A1-493F-B1CB-0ABD4D05BEFF

The ID of the request.

TrustPassword String 82Tg****

The AD trust password.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=CreateADConnectorDirectory
&DomainName=corp.example.com
&DomainUserName=sAMAccountName
&DomainPassword=testPassword
&RegionId=cn-hangzhou
&DnsAddress.1=127.0.**.**
&VSwitchId.1=vsw-bp19ocz3erfx15uon****
&<Common request parameters>

Sample success responses

XML format

<CreateADConnectorDirectoryResponse>
      <TrustPassword>82Tg****</TrustPassword>
      <DirectoryId>cn-hangzhou+dir-gx2x1dhsmu52rd****</DirectoryId>
      <RequestId>3FE99D5E-93A1-493F-B1CB-0ABD4D05BEFF</RequestId>
      <AdConnectors>
            <Address>127.0.**.**</Address>
      </AdConnectors>
</CreateADConnectorDirectoryResponse>

JSON format

{
    "TrustPassword":"82Tg****",
    "DirectoryId":"cn-hangzhou+dir-gx2x1dhsmu52rd****",
    "RequestId":"3FE99D5E-93A1-493F-B1CB-0ABD4D05BEFF",
    "AdConnectors":[
        {
            "Address":"127.0.**.**"
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.