tencent cloud

Feedback

AssignIpv6Addresses

Last updated: 2023-08-18 14:28:14

1. API Description

Domain name for API request: ecm.tencentcloudapi.com.

This API is used to apply for an IPv6 address for an ENI.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: AssignIpv6Addresses.
Version Yes String Common Params. The value used for this API: 2019-07-19.
Region No String Common Params. This parameter is not required for this API.
EcmRegion Yes String ECM region
NetworkInterfaceId Yes String ENI instance ID, such as eni-1snva0vd. Currently, only the primary ENI will be assigned the ID.
Ipv6Addresses.N No Array of Ipv6Address List of specified IPv6 addresses. You can specify up to 10 IPv6 addresses at a time. The quota is calculated together with that of Ipv6AddressCount, a required input parameter alternative to this one.
Ipv6AddressCount No Integer Number of automatically assigned IPv6 addresses. The total number of private IP addresses cannot exceed the quota. The quota is calculated together with that of Ipv6Addresses, a required input parameter alternative to this one.
Ipv6ISP No String Ipv6 ISP. Valid values:
CTCC: China Telecom
CUCC: China Unicom
CMCC: China Mobile

3. Output Parameters

Parameter Name Type Description
Ipv6AddressSet Array of Ipv6Address List of IPv6 addresses assigned to ENIs.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Assigning IPv6 addresses automatically based on Ipv6AddressCount

Input Example

https://ecm.tencentcloudapi.com/?Action=AssignIpv6Addresses
&EcmRegion=ap-xian-ecm
&NetworkInterfaceId=eni-1snva0vd
&Ipv6AddressCount=1
&<Common request parameters>

Output Example

{
    "Response": {
        "Ipv6AddressSet": [
            {
                "Address": "3402:4e00:20:1202:0:8d05:c272:f514",
                "AddressId": "",
                "Primary": false,
                "Description": "",
                "IsWanIpBlocked": false,
                "State": "PENDING"
            }
        ],
        "RequestId": "4a8d6fc0-bc48-4394-b1f7-2818a217359a"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.InternalOperationFailure Internal error.
InvalidParameter.InvalidDataFormat The data format is incorrect.
InvalidParameterValue The parameter value is incorrect.
InvalidParameterValue.InvalidEcmRegion The region parameter is invalid.
InvalidParameterValue.InvalidRegion The ECM region is invalid.
InvalidParameterValue.Malformed The input parameter format is invalid.
InvalidParameterValue.NodeNotSupportIPv6 The node does not support IPv6.
InvalidParameterValue.SubnetConflict The specified CIDR block conflicts with another subnet in the same VPC.
InvalidParameterValue.UnsupportedRegion The region is not supported.
InvalidParameterValue.UserNotSupportIPv6 IPv6 is not supported.
LimitExceeded.AddressQuotaLimitExceeded The number applied for exceeds the limit.
LimitExceeded.CidrBlock Exceeded the upper limit of the assigned IPv6 IP ranges.
ResourceInsufficient Insufficient resource.
ResourceNotFound The resource does not exist.
UnauthorizedOperation.ForbiddenOperation You don't have the permission to perform this operation.
UnsupportedOperation.InvalidState The resource status is invalid.