All Products
Search
Document Center

Alibaba Cloud DNS PrivateZone:DescribeZoneRecords

更新時間:Sep 06, 2023

Queries the details of DNS records.

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 DescribeZoneRecords

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

ZoneId String Yes CAgICA1OA_58

The ID of the private zone.

Lang String No en

The language.

Keyword String No test

The keyword for searches in "%Keyword%" mode. The keyword is not case-sensitive.

PageNumber Integer No 1

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

PageSize Integer No 100

The number of entries to return on each page. The maximum value is 100. Default value: 20.

UserClientIp String No 1.1.1.1

The IP address of the client.

Tag String No tag

The tag used to search for DNS records.

By default, this parameter is left empty. DNS records for the current private zone are to be queried.

If you set this parameter to ecs, DNS records of the hostnames in the virtual private clouds (VPCs) that are associated with the current private zone are to be queried.

SearchMode String No LIKE

The search mode. Valid values:

  • LIKE: fuzzy search.
  • EXACT: exact search. This is the default value.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 100

The number of entries returned per page.

Records Array of Record

The details of DNS records.

Record
Priority Integer 60

The priority of the MX record. Valid values: 1 to 99.

This parameter is returned if the type of the DNS record is MX.

RecordId Long 5809

The ID of the DNS record.

Remark String xxx

The description of the DNS record.

Rr String www

The hostname.

Status String ENABLE

The state of the DNS record.

Ttl Integer 60

The time to live (TTL) of the DNS record. Default value: 60.

Type String A

The type of the DNS record.

Value String 1.1.1.1

The value of the DNS record.

RequestId String 7B07FBC3-3A53-4939-A3C6-2BDFE407BAB2

The ID of the request.

TotalItems Integer 100

The total number of DNS records.

TotalPages Integer 100

The total number of returned pages.

Examples

Sample requests

http://pvtz.aliyuncs.com/?Action=DescribeZoneRecords
&ZoneId=CAgICA1OA_58
&<Common request parameters>

Sample success responses

XML format

<DescribeZoneRecordsResponse>
    <PageNumber>1</PageNumber>
    <Records>
        <Record>
            <Status>DISABLE</Status>
            <Value>1.1.1.1</Value>
            <Rr>www</Rr>
            <RecordId>5809</RecordId>
            <Ttl>60</Ttl>
            <Type>A</Type>
        </Record>
        <Record>
            <Status>ENABLE</Status>
            <Value>1.1.1.1</Value>
            <Rr>a49880308bb2</Rr>
            <RecordId>5808</RecordId>
            <Ttl>60</Ttl>
            <Type>A</Type>
        </Record>
    </Records>
    <PageSize>20</PageSize>
    <RequestId>7B07FBC3-3A53-4939-A3C6-2BDFE407BAB2</RequestId>
    <TotalItems>2</TotalItems>
    <TotalPages>1</TotalPages>
</DescribeZoneRecordsResponse>

JSON format

{
    "PageNumber": 1, 
    "Records": {
        "Record": [
            {
                "Status": "DISABLE", 
                "Value": "1.1.1.1", 
                "Rr": "www", 
                "RecordId": 5809, 
                "Ttl": 60, 
                "Type": "A"
            }, 
            {
                "Status": "ENABLE", 
                "Value": "1.1.1.1", 
                "Rr": "a49880308bb2", 
                "RecordId": 5808, 
                "Ttl": 60, 
                "Type": "A"
            }
        ]
    }, 
    "PageSize": 20, 
    "RequestId": "2748A96A-3D47-4B27-AE8B-75C41B16D652", 
    "TotalItems": 2, 
    "TotalPages": 1
}

Error codes

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