Queries all Domain Name System (DNS) records of the specified primary domain names based on the specified parameters.
Operation description
- You can specify DomainName, PageNumber, and PageSize to query the DNS records of the specified domain names.
- You can also specify RRKeyWord, TypeKeyWord, or ValueKeyWord to query the DNS records that contain the specified keyword.
- By default, the DNS records are sorted in reverse chronological order based on the time when they were added.
- You can specify GroupId to query the DNS records of the specified domain names based on the group ID. You can query the DNS records of all domain names and the domain names in the default group.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
alidns:DescribeDomainRecords | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language. | en |
DomainName | string | Yes | The domain name. | example.com |
PageNumber | long | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | long | No | The number of entries per page. Valid values: 1 to 500. Default value: 20. | 20 |
KeyWord | string | No | The keyword. | test |
RRKeyWord | string | No | The hostname keyword based on which the system queries DNS records. The system queries DNS records based on the value of this parameter in fuzzy match mode. The value is not case-sensitive. | www |
TypeKeyWord | string | No | The type keyword based on which the system queries DNS records. The system queries DNS records based on the value of this parameter in exact match mode. The value is not case-sensitive. | MX |
ValueKeyWord | string | No | The record value keyword based on which the system queries DNS records. The system queries DNS records based on the value of this parameter in fuzzy match mode. The value is not case-sensitive. | com |
OrderBy | string | No | The method that is used to sort the returned DNS records. By default, the DNS records are sorted in reverse chronological order based on the time when they were added. | default |
Direction | string | No | The order in which you want to sort the returned DNS records. Valid values: DESC and ASC. Default value: DESC. | DESC |
SearchMode | string | No | The search mode. Valid values: LIKE, EXACT, and ADVANCED.
| LIKE |
GroupId | long | No | The ID of the domain name group.
| 2223 |
Type | string | No | The type of the DNS records to query. For more information, see | A |
Line | string | No | cn_mobile_anhui | |
Status | string | No | The status of the DNS records to query. Valid values: Enable and Disable. | Enable |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 2,
"PageSize": 20,
"RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
"DomainRecords": {
"Record": [
{
"Status": "Enable",
"Type": "MX",
"Remark": "test",
"TTL": 600,
"RecordId": "9999985",
"Priority": 5,
"RR": "www",
"DomainName": "example.com",
"Weight": 2,
"Value": "mail1.hichina.com",
"Line": "default",
"Locked": false,
"CreateTimestamp": 1666501957000,
"UpdateTimestamp": 1676872961000
}
]
},
"PageNumber": 1
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-20 | The response structure of the API has changed | View Change Details |