# DescribeNetworkInterfacePublicIPv6

## 1. API Description

This API (DescribeNetworkInterfacePublicIPv6) is used to query the public IPv6 information of a vNIC.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type   | Description |
| -------------- | -------- | ------ | ----------- |
| nicId          | Yes      | String | vNIC ID.    |

## 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> |
| address        | [PublicIpv6CidrAddress](https://docs.console.zenlayer.com/api-reference/compute/datastructure#publicipv6cidraddress) | <p>Public IPv6 information.</p><p>If the vNIC does not have a public IPv6 address, the value is empty.</p>            |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the public IPv6 information of a vNIC.**

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

Request：
{
    "nicId": "<nicId>"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "address": {
      "ipv6CidrId": "<ipv6CidrId>",
      "ipv6Cidr": "2a0b:21c1:xx:xx:0:2::/96",
      "primaryIpv6Address": "2a0b:21c1:xx:xx:0:2::2",
      "internetChargeType": "ByBandwidthCluster",
      "bandwidth": 100,
      "trafficPackageSize": null,
      "bandwidthCluster": {
        "bandwidthClusterId": "<bandwidthClusterId>",
        "bandwidthClusterName": "Test",
      }
    }
  }
}
```

{% 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          |
| ---------------- | ------------------------ | -------------------- |
| 404              | INVALID\_NIC\_NOT\_FOUND | vNIC does not exist. |
