Calls the DescribeSubDomainRecords operation to query all DNS records of a specific subdomain name based on input parameters.

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 DescribeSubDomainRecords

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

SubDomain String Yes www.abc.com

The subdomain name.

For example, www.abc.com. If you set this parameter to abc.com, it is the DNS record of the @ host.

AccessKeyId String No your_accesskey_id

The AccessKey ID provided to you by Alibaba Cloud.

DomainName String No example.com

The domain name.

Lang String No en

The language type.

Line String No default

The resolution line.

PageNumber Long No 1

The number of the page to return. Pages start from page 1. Default value: 1.

PageSize Long No 20

The number of entries to return on each page. Maximum value: 500. Default value: 20.

Type String No MX

The type of the DNS record. If you do not specify this parameter, all DNS record types corresponding to the subdomain name are returned.

DNS record types include A, MX, CNAME, TXT, REDIRECT_URL, FORWORD_URL, NS, AAAA, and SRV. The value is not case-sensitive.

UserClientIp String No 1.1.1.1

The IP address of the client.

Response parameters

Parameter Type Example Description
DomainRecords Array

The list of DNS records.

Record

Details about a DNS record.

DomainName String example.com

The domain name.

Line String default

The resolution line.

Locked Boolean false

The lock status of the DNS record.

Priority Long 2

The priority of the MX-type DNS record.

RR String www

The host record.

RecordId String 9999985

The ID of the DNS record.

Status String Enable

The status of the DNS record.

TTL Long 600

The TTL of the resolution.

Type String CNAME

The type of the DNS record.

Value String mail1.hichina.com

The value of the DNS record.

Weight Integer 10

The weight of the DNS record.

PageNumber Long 1

The page number of the returned page.

PageSize Long 2

The number of entries returned per page.

RequestId String 536E9CAD-DB30-4647-AC87-AA5CC38C5382

The ID of the request.

TotalCount Long 2

The total number of DNS records.

Examples

Sample requests


http(s)://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords
&SubDomain=www.abc.com
&<Common request parameters>

Sample success responses

XML format

<DescribeSubDomainRecordsResponse>
      <RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
      <TotalCount>2</TotalCount>
      <PageNumber>1</PageNumber>
      <PageSize>2</PageSize>
      <DomainRecords>
            <Record>
                  <DomainName>example.com</DomainName>
                  <RecordId>9999985</RecordId>
                  <RR>www</RR>
                  <Type>CNAME</Type>
                  <Value>mail1.hichina.com</Value>
                  <Line>default</Line>
                  <TTL>600</TTL>
                  <Status>Enable</Status>
                  <Locked>false</Locked>
                  <Weight>10</Weight>
            </Record>
            <Record>
                  <DomainName>example.com</DomainName>
                  <RecordId>9999986</RecordId>
                  <RR>www</RR>
                  <Type>CNAME</Type>
                  <Value>mail2.hichina.com</Value>
                  <Line>default</Line>
                  <TTL>600</TTL>
                  <Status>Enable</Status>
                  <Locked>false</Locked>
                  <Weight>10</Weight>
            </Record>
      </DomainRecords>
</DescribeSubDomainRecordsResponse>

JSON format

{
	"PageNumber":1,
	"TotalCount":2,
	"PageSize":2,
	"RequestId":"536E9CAD-DB30-4647-AC87-AA5CC38C5382",
	"DomainRecords":{
		"Record":[
			{
				"RR":"www",
				"Status":"Enable",
				"Value":"mail1.hichina.com",
				"Weight":10,
				"RecordId":"9999985",
				"Type":"CNAME",
				"DomainName":"example.com",
				"Locked":false,
				"Line":"default",
				"TTL":600
			},
			{
				"RR":"www",
				"Status":"Enable",
				"Value":"mail2.hichina.com",
				"Weight":10,
				"RecordId":"9999986",
				"Type":"CNAME",
				"DomainName":"example.com",
				"Locked":false,
				"Line":"default",
				"TTL":600
			}
		]
	}
}

Error codes

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