# DescribeIpv6Cidrs

## 1. API Description

This API (DescribeIpv6Cidrs) is used to query the list of IPv6 CIDR blocks.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                                      | Description                                                                                          |
| --------------- | -------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| cidrIds         | No       | Array of String                                                                           | Filter by one or more CIDR block IDs.                                                                |
| regionId        | No       | String                                                                                    | Filter by the region ID where the CIDR block is located.                                             |
| name            | No       | String                                                                                    | Filter by CIDR block name. Fuzzy search is supported.                                                |
| cidrBlock       | No       | String                                                                                    | Filter by CIDR block address.                                                                        |
| resourceGroupId | No       | String                                                                                    | Filter by resource group ID.                                                                         |
| pageSize        | No       | Integer                                                                                   | <p>The returned page size. Default value: 20. Maximum value: 1000.</p><p>Value range: \[1, 1000]</p> |
| pageNum         | No       | Integer                                                                                   | <p>Number of pages returned.</p><p>Value range: \[1, +)</p><p>Default value: 1</p>                   |
| tagKeys         | No       | Array of String                                                                           | <p>Search by tag key.</p><p>You can query up to 20 tag keys in each request.</p>                     |
| tags            | No       | Array of [Tag](https://docs.console.zenlayer.com/api-reference/compute/datastructure#tag) | <p>Search by tag.</p><p>You can query up to 20 tags in each request.</p>                             |

## 3. Output Parameters

| Parameter Name | Type                                                                                                        | Description                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                                      | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                                                     | Number of resources meeting the filtering conditions.                                                                 |
| dataSet        | Array of [Ipv6CidrInfo](https://docs.console.zenlayer.com/api-reference/compute/datastructure#ipv6cidrinfo) | Data for the list of IPv6 CIDR blocks.                                                                                |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the list of CIDR blocks within `2400:8a00::/28`.**

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

Request：
{
    "cidrIds": ["xxx"],
    "regionId": "asia-east-1",
    "cidrBlock": "2400:8a00::/28",
    "pageSize": 10,
    "pageNum": 1
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
    "totalCount": 10,
    "dataSet": [
      {
        "cidrId": "xxx",
        "regionId": "xxx",
        "name": "xxx",
        "status": "AVAILABLE",
        "cidrBlock": "2400:8a00::/28",
        "source": "BYOIP",
        "networkLineType": "PremiumBGP",
        "subnetIds": ["<subnetId>"],
        "nicIds": ["<nicId1>","<nicId2>"],
        "netmask": 2,
        "poolId": "xxx",
        "createTime": "xxx",
        "expiredTime": "xxx",
        "resourceGroupId": "xxx",
        "resourceGroupName": "xxx",
        "tags":null
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
