Help Center/ Domain Name Service/ API Reference/ APIs/ Batch Operations/ Batch Querying Resources Related to DNS Query Statistics
Updated on 2026-01-15 GMT+08:00

Batch Querying Resources Related to DNS Query Statistics

Function

This API is used to batch query resources related to DNS query statistics.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v2.1/batch-query-instances

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

dim_name

Yes

Array of strings

Definition

Query dimensions supported by DNS batch query APIs.

Constraints

N/A

Range

  • dns_public_zone_id: Public zone ID

  • dns_public_recordset_id: Public record set ID, which must be used together with dns_public_zone_id.

  • dns_private_zone_id: Private zone ID

  • vpc_id: VPC ID, which must be used together with dns_private_zone_id.

Default Value

N/A

ids

Yes

Array<Array<String>>

List of resource IDs reported by DNS.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

instances

Array of ResolutionInstances objects

Resource details returned by querying resource IDs.

Table 3 ResolutionInstances

Parameter

Type

Description

dns_public_zone_id

ZoneResolutionInstances object

Resource details of the public zone.

dns_public_recordset_id

RsetResolutionInstances object

Details about a public record set. This parameter must be used together with dns_public_zone_id.

dns_private_zone_id

ZoneResolutionInstances object

Resource details of the private zone.

vpc_id

VpcResolutionInstances object

Details about the VPC. This parameter must be used together with dns_private_zone_id.

Table 4 RsetResolutionInstances

Parameter

Type

Description

id

String

Definition

Record set ID.

Range

N/A

name

String

Definition

Domain name for which the record set is configured.

Range

N/A

status

String

Definition

Record set status.

Range

  • ACTIVE: Normal

  • PENDING_CREATE: Creating

  • PENDING_UPDATE: Updating

  • PENDING_DELETE: Deleting

  • PENDING_FREEZE: Freezing

  • FREEZE: Frozen

  • ILLEGAL: Frozen due to violations

  • POLICE: Frozen due to security reasons

  • PENDING_DISABLE: Disabling

  • DISABLE: Disabled

  • ERROR: Failed

type

String

Definition

Record set type.

Range

  • A: maps a domain name to specified IPv4 addresses.

  • AAAA: maps a domain name to specified IPv6 addresses.

  • MX: maps domain names to email servers.

  • CNAME: maps one domain name to another domain name or multiple domain names to one domain name.

  • TXT: stores text-based information associated with a domain name.

  • SRV: records the services provided by servers.

  • NS: specifies the authoritative DNS server of a domain name.

  • SOA: provides basic information about domain names and details about authoritative servers.

  • CAA: specifies the CA that issues HTTPS certificates for a domain name to prevent incorrect certificate issuing. It only applies to public domain name resolution.

  • PTR: maps an IP address back to a domain name. It only applies to private domain name resolution.

Table 5 ZoneResolutionInstances

Parameter

Type

Description

id

String

Definition

Zone ID.

Range

N/A

name

String

Definition

Domain name.

Range

N/A

status

String

Definition

The zone status.

Range

  • ACTIVE: Normal

  • PENDING_CREATE: Creating

  • PENDING_UPDATE: Updating

  • PENDING_DELETE: Deleting

  • PENDING_FREEZE: Freezing

  • FREEZE: Frozen

  • ILLEGAL: Frozen due to violations

  • POLICE: Frozen due to security reasons

  • PENDING_DISABLE: Disabling

  • DISABLE: Disabled

  • ERROR: Failed

region

String

Definition

Region where the zone belongs.

Range

N/A

enterprise_project_id

String

Definition

Enterprise project ID.

Range

N/A

Table 6 VpcResolutionInstances

Parameter

Type

Description

id

String

Definition

VPC ID.

Range

N/A

name

String

Definition

VPC name.

Range

N/A

Example Requests

Querying resources related to DNS query statistics

POST https://{endpoint}/v2.1/batch-query-instances

{
  "dim_name" : [ "dns_public_zone_id", "dns_public_recordset_id" ],
  "ids" : [ [ "9a175b9787bcc2710187c5ae33ad2670", "9a186e6689ce017c0189cfff487966cb" ], [ "9a175b9785770684018577afafe900dc", "9a175b9784c34a960184c35e4243000b" ] ]
}

Example Responses

Status code: 200

Querying DNS resources

{
  "instances" : [ {
    "dns_public_zone_id" : [ {
      "name" : "example.com.",
      "id" : "9a175b9787bcc2710187c5ae33ad2670",
      "region" : "global",
      "enterprise_project_id" : "0"
    } ],
    "dns_public_recordset_id" : [ {
      "id" : "9a186e6689ce017c0189cfff487966cb",
      "name" : "www.example.com."
    } ]
  }, {
    "dns_public_zone_id" : [ {
      "name" : "example.cn.",
      "id" : "9a175b9785770684018577afafe900dc",
      "region" : "global",
      "enterprise_project_id" : "50b6a13d-4b22-4122-a100-e9915b9c1cff"
    } ],
    "dns_public_recordset_id" : [ {
      "id" : "9a175b9784c34a960184c35e4243000b",
      "name" : "www.example.cn."
    } ]
  } ]
}

Status Codes

Status Code

Description

200

Querying DNS resources

Error Codes

See Error Codes.