Invokes the AllocateIpv6InternetBandwidth operation to enable Internet bandwidth for an IPv6 address in a VPC so that the IPv6 address can communicate over the Internet. After the allocation, the IPv6 address can both initiate outbound connections to access the Internet and receive inbound connections from the Internet.
Operation description
- You can allocate Internet bandwidth to the following types of IPv6 addresses:
IPv6 addresses assigned to elastic network interfaces (ENIs) of ECS instances.
Unassociated IPv6 addresses that are not attached to any resource instance.
Before you call this operation, make sure that the target IPv6 address already exists. This means that an ECS instance in the VPC has been assigned an IPv6 address, or an unassociated IPv6 address has been created by calling AllocateIpv6Address.
After the allocation, the IPv6 address can both initiate outbound connections to the Internet and receive inbound connections from the Internet. To allow public network access to the Internet, call CreateIpv6EgressOnlyRule to configure an IPv6 egress-only rule.
The AllocateIpv6InternetBandwidth operation does not support concurrent purchases of Internet bandwidth for the same IPv6 address.
- Scenarios:
ECS instance IPv6 public access: Enables an ECS instance to access the Internet or provide services over IPv6.
Unassociated IPv6 public access: Works with IPv6 gateway route tables to route Internet traffic to on-premises IDCs.
Egress-only communication: Works with CreateIpv6EgressOnlyRule to allow public network access and deny inbound connections from the Internet.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:AllocateIpv6InternetBandwidth |
create |
*Ipv6InternetBandwidth
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the IPv6 gateway. You can call the DescribeRegions operation to query the region ID. |
cn-huhehaote |
| Ipv6GatewayId |
string |
No |
The ID of the IPv6 gateway. |
ipv6gw-uf6hcyzu65v98v3du**** |
| Ipv6AddressId |
string |
Yes |
The ID of the IPv6 address. |
ipv6-2zen5j4axcp5l5qyy**** |
| InternetChargeType |
string |
No |
The billable methods for IPv6 Internet bandwidth. Valid values:
. |
PayByBandwidth |
| Bandwidth |
integer |
Yes |
The Internet bandwidth of the IPv6 address. Unit: Mbit/s.
. |
200 |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value can contain only ASCII characters. Note
If you do not specify this parameter, the system uses the RequestId as the ClientToken. The RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value can contain only ASCII characters. Note
If you do not specify this parameter, the system uses the RequestId as the ClientToken. The RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
Yes |
The region ID of the IPv6 gateway. You can call the DescribeRegions operation to query the region ID. |
cn-huhehaote |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Ipv6AddressId |
string |
The ID of the IPv6 address. |
ipv6-2zen5j4axcp5l5qyy**** |
| RequestId |
string |
The request ID. |
6972A26E-99B1-4367-9890-FBDEBB0F5E7D |
| InternetBandwidthId |
string |
The instance ID of the Internet bandwidth associated with the IPv6 gateway after Internet bandwidth is allocated. |
ipv6bw-uf6hcyzu65v98v3du**** |
Examples
Success response
JSON format
{
"Ipv6AddressId": "ipv6-2zen5j4axcp5l5qyy****",
"RequestId": "6972A26E-99B1-4367-9890-FBDEBB0F5E7D",
"InternetBandwidthId": "ipv6bw-uf6hcyzu65v98v3du****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.Bandwidth | The param of %s is illegal. | Invalid Bandwidth value. See the API reference and specify a valid value. |
| 400 | MissingParam.Ipv6InstanceId | The param of Ipv6InstanceId is missing. | The error message returned because Ipv6InstanceId is not set. |
| 400 | InvalidIpv6Instance.NotFound | The specified Ipv6AddressId or Ipv6InternetBandwidthId is not found. | |
| 400 | IllegalParam.ChargeType | The param of %s is illegal. | Invalid ChargeType value. See the API reference and specify a valid value. |
| 400 | IllegalParam.InternetChargeType | The param of %s is illegal. | Invalid InternetChargeType value. See the API reference and specify a valid value. |
| 400 | OperationUnsupported.PrePaid | %s is unsupported. | IPv6 Internet bandwidth does not support the subscription billing method. Change the billing method. |
| 400 | OperationFailed.Ipv6GatewayDisMatchIpv6Address | The operation is failed because of %s. | The IPv6 address and IPv6 gateway do not belong to the same VPC. |
| 400 | OperationFailed.InternetBandwidthAlreadyExisted | The operation is failed because of %s. | Internet bandwidth is already enabled for the IPv6 address. |
| 400 | OperationFailed.Ipv6GatewayNotExist | The operation is failed because of %s. | No IPv6 gateway exists in the VPC to which the IPv6 address belongs. Create an IPv6 gateway and try again. |
| 400 | IncorrectStatus.Ipv6Instance | The status of %s [%s] is incorrect. | The IPv6 address is in an unstable state. Try again later. |
| 400 | IllegalParam.Ipv6Address | The param of %s is illegal. | The IPv6 address is invalid. |
| 400 | UnsupportedFeature.InternetChargeTypeOnFreeIpv6Address | The feature of %s is not supported. | The status of the IPv6 address does not support the billing method. For more information, see the API reference. |
| 400 | UnsupportedFeature.InternetChargeTypeOnStaticIsp | The feature of %s is not supported. | The IPv6 address is of the single ISP type and does not support the billing method. |
| 400 | OperationUnsupported.ULA | %s is unsupported. | This operation does not support ULA addresses. |
| 400 | OperationFailed.OpenCdtServiceFirst | The operation is failed because of %s. | The billing method requires CDT billing enabled. Enable CDT billing and try again. |
| 400 | OperationFailed.UpgradeCdtServiceFirst | The operation is failed because of cdt is not upgraded. | The instance type you specified to purchase needs to be upgraded to CDT billing. Upgrade CDT and try again |
| 400 | OperationUnsupported.PrivateGUA | This operation does not support private GUA addresses. | This operation does not support private GUA addresses. |
| 400 | OperationDenied.UnSupportedBindTypeCloudInstance | Internet bandwidth cannot be allocated to the IPv6 address bound to the cloud service instance. | the ipv6 ip address associated with the cloud service instance cannot be used for internet bandwidth. |
| 500 | OperationFailed.QueryAccountInfo | Query account info failed when create order. | Failed to query the account information when the order is placed. |
| 500 | OperationFailed.SaleValidate | Validate sale condition with subArticle failed. | |
| 500 | SystemBusy | The system is busy. Please try again later. | The system is busy. Please try again later. |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | |
| 404 | ResourceNotFound.Ipv6Address | The specified resource of %s is not found. | The IPv6 address is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.