DescribePrivateZones

1. 接口描述

本接口(DescribePrivateZones)用于查询内网权威域名列表。

2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

参数名称
必选
类型
描述

zoneIds

Array of String

根据内网权威域名ID列表过滤。

最长不超过100个。

vpcIds

Array of String

根据Zone绑定的VPC ID筛选过滤。

最长不超过100个。

zoneName

String

根据内网权威域名过滤。

resourceGroupId

String

根据资源组ID过滤。

pageSize

Integer

返回的分页大小,默认为20,最大为1000。

可选值范围:[1, 1000]。

pageNum

Integer

返回的分页数,默认为1。

可选值范围:[1, +)。

tagKeys

Array of String

根据标签键进行搜索。

最长不得超过20个标签键。

tags

Array of Tag

根据标签进行搜索。

最长不得超过20个标签。

3. 响应结果

参数名称
类型
描述

requestId

String

唯一请求 ID。

每次请求都会返回。定位问题时需要提供该次请求的 requestId。

totalCount

Integer

满足过滤条件的内网权威域名总数。

dataSet

Array of PrivateZone

返回的内网权威域名列表数据。

4. 代码示例

1. 查询内网权威域名列表。

POST /api/v2/zdns HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribePrivateZones
<Common Request Params>

Request:
{
}

Response:
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "totalCount": 0,
    "dataSet": [
      {
        "zoneId": "<zoneId>",
        "zoneName": "example.com",
        "proxyPattern": "ZONE",
        "remark": "Test Zone",
        "vpcIds": [
          "<vpcId-1>",
          "<vpcId-2>"
        ],
        "tags": {
          "tags": [
            {
              "key": "test",
              "value": "test"
            }
          ]
        },
        "resourceGroup": {
          "resourceGroupId": "<resourceGroupId>",
          "resourceGroupName": "Default Resource Group"
        },
        "createTime": "2025-11-18 14:38:13"
      }
    ]
  }
}

5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的开发工具集(SDK),未来会陆续支持更多开发语言,方便快速接入和使用Zenlayer的产品和服务。

6. 错误码

下面包含业务逻辑中遇到的错误码,其他错误码见公共错误码

HTTP状态码

错误码

说明

最后更新于