All Products
Search
Document Center

Virtual Private Cloud:AllocateIpv6InternetBandwidth

Last Updated:Nov 27, 2024

Default IPv6 gateways support only private communication. You can call the AllocateIpv6InternetBandwidth operation to purchase Internet bandwidth resources for an IPv6 address. This way, ECS instances in a VPC can access the Internet through the IPv6 address. IPv6 clients can also access the ECS instances over the Internet.

Operation description

You cannot repeatedly call the AllocateIpv6InternetBandwidth operation within a specific time period.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:AllocateIpv6InternetBandwidthcreate
*Ipv6InternetBandwidth
acs:vpc:{#regionId}:{#accountId}:ipv6bandwidth/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the IPv6 gateway is deployed. You can call the DescribeRegions operation to query the most recent region list.

cn-huhehaote
Ipv6GatewayIdstringYes

The ID of the IPv6 gateway.

ipv6gw-uf6hcyzu65v98v3du****
Ipv6AddressIdstringYes

The ID of the IPv6 address.

ipv6-2zen5j4axcp5l5qyy****
InternetChargeTypestringNo

The metering method of the Internet bandwidth for the IPv6 address. Valid values:

  • PayByTraffic: pay-by-data-transfer
  • PayByBandwidth (default): pay-by-bandwidth
PayByBandwidth
BandwidthintegerYes

The Internet bandwidth of the IPv6 gateway. Unit: Mbit/s. Valid values: 1 to 5000.

2
ClientTokenstringNo

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 token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-426655440000

Response parameters

ParameterTypeDescriptionExample
object
Ipv6AddressIdstring

The ID of the IPv6 address.

ipv6-2zen5j4axcp5l5qyy****
RequestIdstring

The request ID.

6972A26E-99B1-4367-9890-FBDEBB0F5E7D
InternetBandwidthIdstring

The ID of the Internet bandwidth that you purchased for the IPv6 gateway.

ipv6bw-uf6hcyzu65v98v3du****

Examples

Sample success responses

JSONformat

{
  "Ipv6AddressId": "ipv6-2zen5j4axcp5l5qyy****",
  "RequestId": "6972A26E-99B1-4367-9890-FBDEBB0F5E7D",
  "InternetBandwidthId": "ipv6bw-uf6hcyzu65v98v3du****"
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.BandwidthThe param of %s is illegal.Invalid Bandwidth value. See the API reference and specify a valid value.
400MissingParam.Ipv6InstanceIdThe param of Ipv6InstanceId is missing.The error message returned because Ipv6InstanceId is not set.
400InvalidIpv6Instance.NotFoundThe specified Ipv6AddressId or Ipv6InternetBandwidthId is not found.The error message returned because Ipv6AddressId or Ipv6InternetBandwidthId is not set.
400IllegalParam.ChargeTypeThe param of %s is illegal.Invalid ChargeType value. See the API reference and specify a valid value.
400IllegalParam.InternetChargeTypeThe param of %s is illegal.Invalid InternetChargeType value. See the API reference and specify a valid value.
400OperationUnsupported.PrePaid%s is unsupported.IPv6 Internet bandwidth does not support the subscription billing method. Change the billing method.
400OperationFailed.Ipv6GatewayDisMatchIpv6AddressThe operation is failed because of %s.The IPv6 address and IPv6 gateway do not belong to the same VPC.
400OperationFailed.InternetBandwidthAlreadyExistedThe operation is failed because of %s.Internet bandwidth is already enabled for the IPv6 address.
400OperationFailed.Ipv6GatewayNotExistThe 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.
400IncorrectStatus.Ipv6InstanceThe status of %s [%s] is incorrect.The IPv6 address is in an unstable state. Try again later.
400IllegalParam.Ipv6AddressThe param of %s is illegal.The IPv6 address is invalid.
400UnsupportedFeature.InternetChargeTypeOnFreeIpv6AddressThe 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.
400UnsupportedFeature.InternetChargeTypeOnStaticIspThe feature of %s is not supported.The IPv6 address is of the single ISP type and does not support the billing method.
400OperationUnsupported.ULA%s is unsupported.This operation does not support ULA addresses.
400OperationFailed.OpenCdtServiceFirstThe operation is failed because of %s.The billing method requires CDT billing enabled. Enable CDT billing and try again.
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
404ResourceNotFound.Ipv6AddressThe specified resource of %s is not found.The IPv6 address is not found.
500OperationFailed.QueryAccountInfoQuery account info failed when create order.Failed to query the account information when the order is placed.
500OperationFailed.SaleValidateValidate sale condition with subArticle failed.Failed to validate the sales condition with a subproject.
500SystemBusyThe system is busy. Please try again later.The system is busy. Please try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-24The Error code has changed. The request parameters of the API has changedView Change Details
2023-12-08The Error code has changedView Change Details
2023-08-30API Description Update. The Error code has changedView Change Details
2023-08-03The Error code has changedView Change Details