> 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/zec/cidr-block/describeipv6cidrnetmasks.md).

# DescribeIpv6CidrNetmasks

## 1. API Description

This API (DescribeIpv6CidrNetmasks) is used to query the IPv6 CIDR mask sizes currently available for purchase in the specified region, along with their stock and unit prices.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name         | Required | Type                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------- | -------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| regionId               | Yes      | String                                                               | ID of the region where the IPv6 CIDR block to be queried is located.                                                                                                                                                                                                                                                                                                                                                                |
| instanceChargePostpaid | No       | [ChargePostpaid](/api-reference/zec/datastructure.md#chargepostpaid) | <p>Commitment period settings for postpaid.</p><p>When <code>period</code> is specified, the system checks whether the commitment period has been enabled (an error is returned if not) and calculates the price based on it. The value must be the same as the one passed for price inquiry and ordering. If not passed or <code>period</code> is not specified, the price is calculated based on a 1-month commitment period.</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>                                                                           |
| netmaskSet     | Array of [Ipv6CidrNetmaskInfo](/api-reference/zec/datastructure.md#ipv6cidrnetmaskinfo) | <p>List of mask sizes currently available for purchase in this region, sorted by mask in ascending order.</p><p>Masks with zero stock or without a configured sales price are not returned.</p> |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the IPv6 CIDR mask sizes currently available for purchase in `asia-east-1`.**

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

Request:
{
  "regionId": "asia-east-1",
  "instanceChargePostpaid": { "period": 1 }
}

Response:
{
  "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
  "response": {
    "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
    "netmaskSet": [
      {
        "netmask": 29,
        "networkLineTypes": [
          {
            "networkLineType": "PremiumBGP",
            "stock": 4,
            "price": {
              "discount": 95.0,
              "discountPrice": 380.0,
              "originalPrice": 400.0,
              "unitPrice": null,
              "discountUnitPrice": null,
              "chargeUnit": null,
              "stepPrices": null
            }
          },
          {
            "networkLineType": "StandardBGP",
            "stock": 2,
            "price": {
              "discount": 95.0,
              "discountPrice": 285.0,
              "originalPrice": 300.0,
              "unitPrice": null,
              "discountUnitPrice": null,
              "chargeUnit": null,
              "stepPrices": null
            }
          }
        ]
      },
      {
        "netmask": 30,
        "networkLineTypes": [
          {
            "networkLineType": "PremiumBGP",
            "stock": 12,
            "price": {
              "discount": 95.0,
              "discountPrice": 95.0,
              "originalPrice": 100.0,
              "unitPrice": null,
              "discountUnitPrice": null,
              "chargeUnit": null,
              "stepPrices": null
            }
          }
        ]
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                  | Description                          |
| ---------------- | --------------------------- | ------------------------------------ |
| 404              | INVALID\_REGION\_NOT\_FOUND | The specified region does not exist. |
