> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/cn/zec/public-ipv6/describeipv6addresses.md).

# DescribeIpv6Addresses

## 1. 接口描述

本接口(DescribeIpv6Addresses)用于指定条件查询已分配的公网IPv6信息。用户可以根据ID、名称、绑定的资源等信息来搜索。

## 2. 请求参数

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

| 参数名称            | 必选 | 类型                                                              | 描述                                                                                                                       |
| --------------- | -- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| ipv6Ids         | 否  | Array of String                                                 | <p>按照公网IPv6的唯一ID过滤。</p><p>最大不能超过100个。</p>                                                                                |
| regionId        | 否  | String                                                          | <p>按照公网IPv6所属节点ID过滤。</p><p>可通过调用 <a href="/api-reference/cn/zec/location/describeregions.md">DescribeRegions</a> 获取。</p> |
| ipv6Cidr        | 否  | String                                                          | 按照公网IPv6的CIDR地址段过滤，该字段支持模糊匹配。                                                                                            |
| status          | 否  | [Ipv6Status](/api-reference/cn/zec/datastructure.md#ipv6status) | 按照公网IPv6的状态过滤。                                                                                                           |
| associatedIds   | 否  | Array of String                                                 | <p>按照公网IPv6绑定的资源ID过滤。</p><p>取值可以是网卡ID或负载均衡ID。</p>                                                                        |
| resourceGroupId | 否  | String                                                          | 按照公网IPv6所属的资源组ID过滤。                                                                                                      |
| pageSize        | 否  | Integer                                                         | <p>返回的分页大小。</p><p>当未传递时，默认值为20。</p><p>可选值范围：\[1, 1000]</p>                                                               |
| pageNum         | 否  | Integer                                                         | <p>返回的分页数。</p><p>当未传递时，默认值为1。</p><p>可选值范围：\[1, +)</p><p>默认值：1</p>                                                        |

## 3. 响应结果

| 参数名称       | 类型                                                                                 | 描述                                                       |
| ---------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------- |
| requestId  | String                                                                             | <p>唯一请求 ID。</p><p>每次请求都会返回。定位问题时需要提供该次请求的 requestId。</p> |
| totalCount | Integer                                                                            | 满足过滤条件的公网IPv6总数。                                         |
| dataSet    | Array of [Ipv6AddressInfo](/api-reference/cn/zec/datastructure.md#ipv6addressinfo) | 返回的公网IPv6列表。                                             |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}
**1. 查询指定负载均衡上分配的公网IPv6。**

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

Request：
{
  "associatedIds": [
    "<loadBalancerId>"
  ],
  "pageSize": 20,
  "pageNum": 1
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "dataSet": [
      {
        "ipv6Id": "<ipv6Id>",
        "regionId": "asia-east-1",
        "status": "RUNNING",
        "ipv6Cidr": "2a0b:21c1:xx:xx:0:2::/96",
        "primaryIpv6Address": "2a0b:21c1:xx:xx:0:2::2",
        "associatedId": "<loadBalancerId>",
        "associatedType": "LB",
        "nicId": null,
        "instanceId": null,
        "internetChargeType": "ByBandwidth",
        "bandwidth": 100,
        "rateLimitMode": "LOOSE",
        "trafficPackageSize": null,
        "bandwidthCluster": null,
        "resourceGroupId": "<resourceGroupId>",
        "resourceGroupName": "default",
        "createTime": "2026-08-20T16:53:38Z",
        "operationInfo": null
      }
    ],
    "totalCount": 1
  }
}
```

**2. 查询指定网卡上分配的公网IPv6。网卡与负载均衡都通过 `associatedIds` 过滤，一次可传多个。**

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

Request：
{
  "associatedIds": [
    "<nicId>"
  ]
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "dataSet": [
      {
        "ipv6Id": "<ipv6Id>",
        "regionId": "asia-east-1",
        "status": "RUNNING",
        "ipv6Cidr": "2a0b:21c1:xx:xx:0:3::/96",
        "primaryIpv6Address": "2a0b:21c1:xx:xx:0:3::2",
        "associatedId": "<nicId>",
        "associatedType": "NIC",
        "nicId": "<nicId>",
        "instanceId": "<instanceId>",
        "internetChargeType": "ByTrafficPackage",
        "bandwidth": 1000,
        "rateLimitMode": "LOOSE",
        "trafficPackageSize": 1,
        "bandwidthCluster": null,
        "resourceGroupId": "<resourceGroupId>",
        "resourceGroupName": "default",
        "createTime": "2026-08-20T16:53:38Z",
        "operationInfo": {
          "operation": "ModifyBandwidth",
          "status": "OPERATING"
        }
      }
    ],
    "totalCount": 1
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](/api-reference/cn/api-introduction/toolkit.md)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](/api-reference/cn/api-introduction/instruction/commonerrorcode.md)

| HTTP状态码 | 错误码 | 说明 |
| ------- | --- | -- |
