# Apply for IPv6 Address - AssignIPv6

## Overview

Apply for IPv6 Address






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `AssignIPv6`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.sigcalcloud.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Region and Zone List](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |No|
| **SubnetworkId** | string | Subnet ID |**Yes**|
| **ObjectId** | string | Object ID |**Yes**|
| **VPCId** | string | vpc ID |No|
| **InstanceId** | string | Actual resource short ID -- pass product actual ID |No|
| **InstanceType** | int | Corresponding to the InstanceID, the actual resource category ID -- pass the actual product type |No|
| **Mac** | string | Optional: Resources on Mac |No|
| **IPv6Addresses.N** | string | Dedicated IP allocation, mutually exclusive with Count |No|
| **Count** | string | Specified quantity allocation, mutually exclusive with IPv6Addresses |No|
| **Attribute** | string | IP Attributes: Supports enabling public network (Normal), supports internal network only (Private), default Normal |No|
| **Segment** | string | Assign IP addresses to specified network segments |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **IPv6Addresses** | array[string] | IPv6 address |**Yes**|
| **OperatorName** | string | IP type |**Yes**|
| **IPv6Gateway** | string | IPv6 gateway |**Yes**|
| **Mask** | int | mask |**Yes**|




## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=AssignIPv6
&Region=cn-zj
&ProjectId=aBrYndgV
&SubnetworkId=ZSalaBuW
&VPCId=sMRyFjkq
&Mac=iwuQSXWZ
&IPv6Addresses.N=zHThxZGW
&Count=igJemmnm
&Attribute=uWNdjGYe
&ObjectId=DmszzDrk
&InstanceId=ecgVlXjf
&InstanceType=7
&Segment=MObSCSqG
```

### Response Example
    
```json
{
  "Action": "AssignIPv6Response",
  "IPv6Addresses": [
    "UHvTkbtC"
  ],
  "IPv6Gateway": "eHZULCgD",
  "Mask": 2,
  "Message": "pNExjxDU",
  "OperatorName": "ITGAZHLR",
  "RetCode": 0
}
```





