Calls the DescribeSubDomainRecords operation to query all DNS records of a subdomain based on input parameters.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeSubDomainRecords | The operation that you want to perform. Set the value to DescribeSubDomainRecords. |
Lang | String | No | en | The language. |
UserClientIp | String | No | 192.0.2.0 | The IP address of the client. |
SubDomain | String | Yes | a.www.example.com | The subdomain. For example, assume that the SubDomain parameter is set to a.www.example.com. If the DomainName parameter is empty, the DNS records of the subdomain whose domain name is example.com and hostname is "a.www" are queried. If the DomainName parameter is set to www.example.com, the DNS records of the subdomain whose domain name is www.example.com and hostname is "a" are queried. If the DomainName parameter is set to a.www.example.com, the DNS records of the subdomain whose domain name is a.www.example.com and hostname is "@" are queried. |
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 DNS records to query. If you do not specify this parameter, all types of DNS records corresponding to the subdomain are returned. DNS record types include A, MX, CNAME, TXT, REDIRECT_URL, FORWORD_URL, NS, AAAA, and SRV. The value is not case-sensitive. |
Line | String | No | default | The resolution line. |
DomainName | String | No | example.com | The domain name. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalCount | Long | 2 | The total number of DNS records returned. |
PageSize | Long | 2 | The number of entries returned per page. |
RequestId | String | 536E9CAD-DB30-4647-AC87-AA5CC38C5382 | The ID of the request. |
DomainRecords | Array of Record | The list of DNS records returned. |
|
Record | |||
Status | String | Enable | The status of the DNS record. |
Type | String | CNAME | The type of the DNS record. |
Weight | Integer | 10 | The weight of the DNS record. |
Value | String | example.net | The record value. |
TTL | Long | 600 | The Time-to-Live (TTL) of the DNS record. |
Line | String | default | The resolution line. |
RecordId | String | 9999985 | The ID of the DNS record. |
Priority | Long | 2 | The priority of the MX record. |
RR | String | www | The hostname. |
DomainName | String | example.com | The domain name. |
Locked | Boolean | false | Indicates whether the DNS record is locked. |
Remark | String | This is a description. | The description of the DNS record. |
PageNumber | Long | 1 | The number of the returned page. |
Examples
Sample requests
http(s)://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords
&Lang=en
&UserClientIp=192.0.2.0
&SubDomain=a.www.example.com
&PageNumber=1
&PageSize=20
&Type=MX
&Line=default
&DomainName=example.com
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeSubDomainRecordsResponse>
<TotalCount>2</TotalCount>
<PageSize>2</PageSize>
<RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
<DomainRecords>
<Status>Enable</Status>
<Type>CNAME</Type>
<Weight>10</Weight>
<Value>example.net</Value>
<TTL>600</TTL>
<Line>default</Line>
<RecordId>9999985</RecordId>
<Priority>2</Priority>
<RR>www</RR>
<DomainName>example.com</DomainName>
<Locked>false</Locked>
</DomainRecords>
<PageNumber>1</PageNumber>
</DescribeSubDomainRecordsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 2,
"PageSize" : 2,
"RequestId" : "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
"DomainRecords" : [ {
"Status" : "Enable",
"Type" : "CNAME",
"Weight" : 10,
"Value" : "example.net",
"TTL" : 600,
"Line" : "default",
"RecordId" : "9999985",
"Priority" : 2,
"RR" : "www",
"DomainName" : "example.com",
"Locked" : false
} ],
"PageNumber" : 1
}
Error codes
For a list of error codes, see Service error codes.