Retrieves the DNS records for a specified root domain based on the input parameters.
Operation description
You can specify the domain name (DomainName), page number (PageNumber), and page size (PageSize) to retrieve a list of DNS records.
You can specify a keyword for the host record (RRKeyWord), record type (TypeKeyWord), or record value (ValueKeyWord) to query DNS records that contain the keyword.
By default, DNS records are sorted in descending order by the time they were added.
You can specify a domain group ID (GroupId) to query the DNS records in a specific group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alidns:DescribeDomainRecords |
get |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Lang |
string |
No |
The language of the request and response. Default value: zh. Valid values:
|
en |
| DomainName |
string |
Yes |
The domain name. For more information, see DescribeDomains. |
example.com |
| PageNumber |
integer |
No |
The page number. The value starts from 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page for a paged query. Maximum value: 500. Default value: 20. |
20 |
| KeyWord |
string |
No |
The keyword. |
test |
| RRKeyWord |
string |
No |
The keyword for the host record. The search uses a fuzzy match pattern and is not case-sensitive. |
www |
| TypeKeyWord |
string |
No |
The keyword for the record type. The search uses an exact match and is not case-sensitive. |
MX |
| ValueKeyWord |
string |
No |
The keyword for the record value. The search uses a fuzzy match pattern and is not case-sensitive. |
com |
| OrderBy |
string |
No |
The sorting method. Records are sorted in descending order based on the time they were added. |
default |
| Direction |
string |
No |
The sorting direction. Valid values: DESC, ASC. Default value: DESC. |
DESC |
| SearchMode |
string |
No |
The search mode. Valid values: LIKE, EXACT, ADVANCED, and COMBINATION.
|
LIKE |
| GroupId |
integer |
No |
The ID of the domain group.
|
2**** |
| Type |
string |
No |
The type of the DNS record. For more information, see: |
A |
| Line |
string |
No |
The DNS resolution line. Default value: default. For more information, see: |
cn_mobile_anhui |
| Status |
string |
No |
The status of the DNS record. Valid values: Enable: The DNS record is enabled. Disable: The DNS record is paused. |
Enable |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of DNS records. |
2 |
| PageSize |
integer |
The number of DNS records returned in this query. |
20 |
| RequestId |
string |
The request ID. |
536E9CAD-DB30-4647-AC87-AA5CC38C5382 |
| DomainRecords |
object |
||
| Record |
array<object> |
The list of DNS records. |
|
|
object |
|||
| Status |
string |
The status of the DNS record. |
Enable |
| Type |
string |
The record type. |
MX |
| Remark |
string |
The remarks. |
备注 |
| TTL |
integer |
The time to live (TTL). Unit: seconds. |
600 |
| RecordId |
string |
The ID of the DNS record. |
9******* |
| Priority |
integer |
The priority of the MX record. |
5 |
| RR |
string |
The host record. |
www |
| DomainName |
string |
The domain name. |
example.com |
| Weight |
integer |
The weight for load balancing. |
2 |
| Value |
string |
The record value. |
mail1.hichina.com |
| Line |
string |
The DNS resolution line. |
default |
| Locked |
boolean |
The lock status of the DNS record. |
false |
| CreateTimestamp |
integer |
The time when the record was created. This is a UNIX timestamp. |
1666501957000 |
| UpdateTimestamp |
integer |
The time when the record was last updated. This is a UNIX timestamp. |
1676872961000 |
| LbaStatus |
boolean |
Indicates whether a load balancing policy is configured.
|
true |
| PageNumber |
integer |
The current page number. |
1 |
Examples
Success response
JSON format
{
"TotalCount": 2,
"PageSize": 20,
"RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
"DomainRecords": {
"Record": [
{
"Status": "Enable",
"Type": "MX",
"Remark": "备注",
"TTL": 600,
"RecordId": "9*******",
"Priority": 5,
"RR": "www",
"DomainName": "example.com",
"Weight": 2,
"Value": "mail1.hichina.com",
"Line": "default",
"Locked": false,
"CreateTimestamp": 1666501957000,
"UpdateTimestamp": 1676872961000,
"LbaStatus": true
}
]
},
"PageNumber": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.