> 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/compute/bmc/cidr-block/createipv6block.md).

# CreateIpv6Block

## 1. API Description

This API (CreateIpv6Block) is used to create one or more IPv6 CIDR blocks.

#### Prerequisites

* Query stock: call [`DescribeAvailableIpv6Resources`](/api-reference/compute/bmc/cidr-block/describeavailableipv6resources.md) to check available resources.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

* <mark style="color:blue;">An IPv6 CIDR block contains 500 available IPs.</mark>
* <mark style="color:blue;">This API is an async API. A CIDR block ID list is returned after the creation request is sent. However, it does not mean the creation has been completed. The status of the CIDR block will be</mark> <mark style="color:blue;">`CREATING`</mark> <mark style="color:blue;">during the creation. You can use</mark> [<mark style="color:blue;"><mark style="color:purple;">DescribeCidrBlocks<mark style="color:purple;"></mark>](/api-reference/compute/bmc/cidr-block/describecidrblocks.md) <mark style="color:blue;">to query the status of the CIDR block. If the status changes from</mark> <mark style="color:blue;">`Creating`</mark> <mark style="color:blue;">to</mark> <mark style="color:blue;">`Available`</mark><mark style="color:blue;">, it means that the CIDR block has been created successfully;</mark> <mark style="color:blue;">`CREATE_FAILED`</mark> <mark style="color:blue;">means the CIDR block has been created failed. Any operations on the instances are not allowed while creating.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                         | Description                                                                                                                                                                                                              |
| --------------- | -------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| zoneId          | Yes      | String                                                                       | Zone ID to which the CIDR blocks belong.                                                                                                                                                                                 |
| name            | No       | String                                                                       | <p>CIDR block name to be displayed.</p><p>This parameter can contain up to 64 characters.</p>                                                                                                                            |
| amount          | No       | Integer                                                                      | <p>Quantity of IPv6 CIDR blocks you want to purchase.</p><p>Default value: 1.</p><p>Value range: \[1, +)</p>                                                                                                             |
| resourceGroupId | No       | String                                                                       | <p>Resource group ID where the CIDR blocks reside.</p><p>If an available VLAN exists in the specified zone, this parameter will be ignored. The created CIDR blocks will be added to the resource group of the VLAN.</p> |
| tags            | No       | [TagAssociation](/api-reference/compute/bmc/datastructure.md#tagassociation) | <p>Bound tags when creating resources.</p><p>Tag keys must be unique.</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> |
| cidrBlockIds   | Array of String | List of CIDR block IDs.                                                                                               |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
Create an IPv6 CIDR block `example` in `IST-B`, belonging to `Default Resource Group`.

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

Request:
{
  "zoneId": "ISB-B",
  "name": "example",
  "amount": 1
}

Response:
{
  "requestId": "T17BD4918-239C-4633-9F3A-9D2D5E0BA4E2",
  "response": {
    "requestId": "T17BD4918-239C-4633-9F3A-9D2D5E0BA4E2",
    "cidrBlockIds": [
      "cidrBlockId"
    ]
  }
}
```

{% 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\_ZONE\_NOT\_FOUND | Zone not found. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/compute/bmc/cidr-block/createipv6block.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
