You can call this operation to query the details of directories.

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 DescribeDirectories

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

RegionId String Yes cn-hangzhou

The ID of the region.

DirectoryType String No RAM

The type of the directory. Valid values:

  • RAM: RAM directory
  • AD_CONNECTOR: AD directory
DirectoryId.N RepeatList No cn-hangzhou+dir-gx2x1dhsmu52rd****

The ID of directory N. You can specify one or more directory IDs.

MaxResults Integer No 10

The number of entries to return on each page.

Valid values: 1 to 100.

Default value: 10.

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The token used to start the next query. If this parameter is empty, all results are returned.

Response parameters

Parameter Type Example Description
Directories Array of Directory

Details of the directories.

ADConnectors Array of ADConnector

Details of the AD connectors.

ADConnectorAddress String 172.17.**. **

The IP address of the AD connector.

ConnectorStatus String RUNNING

The status of the AD connector. Valid values:

  • CREATING: The AD connector is being created.
  • CONNECTING: The AD connector is being connected. You must configure domain trust for your AD system.
  • RUNNING: The AD connector is running.
  • EXPIRED: The AD connector has expired due to overdue payments.
  • CONNECT_ERROR: An connection error has occurred.
NetworkInterfaceId String eni-bp1i4wx78lgosrj6****

The ID of the NIC to which the AD connector is mounted.

VSwitchId String vsw-bp19ocz3erfx15uon****

The ID of the vSwitch with which the AD connector is associated.

CreationTime String 2020-11-02T01:44Z

The time when the directory was created.

CustomSecurityGroupId String sg-bp1ce64o4g9mdf5u****

The ID of the security group.

DesktopAccessType String 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.
DesktopVpcEndpoint String http://ep-bp1s2vmbj55r5rzc****.epsrv-bp1pcfhpwvlpny01****.cn-hangzhou.privatelink.aliyuncs.com

The endpoint used to connect to the cloud desktop over a VPC.

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

The ID of the directory.

DirectoryType String RAM

The type of the directory. Valid values:

  • RAM
  • AD_CONNECTOR
DnsAddress List ["171.17. **. **"]

The DNS address of the directory.

DnsUserName String testDnsUserName

The DNS username.

DomainName String example.com

The domain name.

DomainPassword String testPassword

The password of the domain administrator.

DomainUserName String sAMAccountName

The username of the domain administrator.

EnableInternetAccess Boolean false

Specifies whether to enable access over the Internet.

Note This parameter is unavailable.
Logs Array of Log

Details of registration logs.

Level String INFO

The level of the log entry. Valid values:

  • INFO
  • ERROR
  • WARN
Message String code:success | message:Create Connector complete.

The message of the log entry.

Step String DescribeDirectories

The step corresponding to the log entry.

TimeStamp String 2021-01-22T06:45Z

The time when the log entry is obtained.

Name String testDirectoryName

The name of the directory.

Status String REGISTERING

The status of the AD directory. Valid values:

  • REGISTERING
  • REGISTERED
TrustPassword String 82Tg****

The AD trust password.

VSwitchIds List vsw-bp19ocz3erfx15uon****

The IDs of the vSwitches specified when the directory was being created.

VpcId String vpc-uf6tz5k67puge5jn8****

The ID of the VPC to which the vSwitch belongs.

NextToken String caeba0bbb2be03f84eb48b699f0a4883

The token used to start the next query. If the value of this parameter is empty, all results are returned.

RequestId String F369A091-002F-49C8-AD55-02A776297C7B

The ID of the request.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=DescribeDirectories
&MaxResults=10
&DirectoryType=RAM
&<Common request parameters>

Sample success responses

XML format

<DescribeDirectoriesResponse>
      <Directories>
            <Status>REGISTERING</Status>
            <DomainName>example.com</DomainName>
            <CustomSecurityGroupId>sg-bp1ce64o4g9mdf5u****</CustomSecurityGroupId>
            <Name>testDirectoryName</Name>
            <DirectoryType>RAM</DirectoryType>
            <DomainPassword>testPassword</DomainPassword>
            <TrustPassword>82Tg****</TrustPassword>
            <DirectoryId>cn-hangzhou+dir-gx2x1dhsmu52rd****</DirectoryId>
            <DesktopVpcEndpoint>http://ep-bp1s2vmbj55r5rzc****.epsrv-bp1pcfhpwvlpny01****.cn-hangzhou.privatelink.aliyuncs.com</DesktopVpcEndpoint>
            <VpcId>vpc-uf6tz5k67puge5jn8****</VpcId>
            <CreationTime>2020-11-02T01:44Z</CreationTime>
            <DesktopAccessType>Internet</DesktopAccessType>
            <DomainUserName>sAMAccountName</DomainUserName>
            <EnableInternetAccess>false</EnableInternetAccess>
            <DnsUserName>testDnsUserName</DnsUserName>
      </Directories>
      <Directories>
            <ADConnectors>
                  <ADConnectorAddress>172.17. **. **</ADConnectorAddress>
                  <NetworkInterfaceId>eni-bp1i4wx78lgosrj6****</NetworkInterfaceId>
                  <ConnectorStatus>RUNNING</ConnectorStatus>
                  <VSwitchId>vsw-bp19ocz3erfx15uon****</VSwitchId>
            </ADConnectors>
            <Logs>
                  <Level>INFO</Level>
                  <Step>DescribeDirectories</Step>
                  <Message>code:success | message:Create Connector complete. </Message>
                  <TimeStamp>2021-01-22T06:45Z</TimeStamp>
            </Logs>
      </Directories>
      <Directories>
            <VSwitchIds>vsw-bp19ocz3erfx15uon****</VSwitchIds>
            <DnsAddress>["171.17. **. **"]</DnsAddress>
      </Directories>
      <RequestId>F369A091-002F-49C8-AD55-02A776297C7B</RequestId>
      <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
</DescribeDirectoriesResponse>

JSON format

{
    "Directories": [{
        "Status": "REGISTERING",
        "DomainName": "example.com",
        "CustomSecurityGroupId": "sg-bp1ce64o4g9mdf5u****",
        "Name": "testDirectoryName",
        "DirectoryType": "RAM",
        "DomainPassword": "testPassword",
        "TrustPassword": "82Tg****",
        "DirectoryId": "cn-hangzhou+dir-gx2x1dhsmu52rd****",
        "DesktopVpcEndpoint": "http://ep-bp1s2vmbj55r5rzc****.epsrv-bp1pcfhpwvlpny01****.cn-hangzhou.privatelink.aliyuncs.com",
        "VpcId": "vpc-uf6tz5k67puge5jn8****",
        "CreationTime": "2020-11-02T01:44Z",
        "DesktopAccessType": "Internet",
        "DomainUserName": "sAMAccountName",
        "EnableInternetAccess": "false",
        "DnsUserName": "testDnsUserName"
    }, {
        "ADConnectors": [{
            "ADConnectorAddress": "172.17. **. **",
            "NetworkInterfaceId": "eni-bp1i4wx78lgosrj6****",
            "ConnectorStatus": "RUNNING",
            "VSwitchId": "vsw-bp19ocz3erfx15uon****"
        }],
        "Logs": [{
            "Level": "INFO",
            "Step": "DescribeDirectories",
            "Message": "code:success | message:Create Connector complete.",
            "TimeStamp": "2021-01-22T06:45Z"
        }]
    }, {
        "VSwitchIds": "vsw-bp19ocz3erfx15uon****",
        "DnsAddress": "[\"171.17. **. **\"]"
    }],
    "RequestId": "F369A091-002F-49C8-AD55-02A776297C7B",
    "NextToken": "caeba0bbb2be03f84eb48b699f0a4883"
}

Error codes

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