All Products
Search
Document Center

IPv6 Gateway:AllocateIpv6InternetBandwidth

Last Updated:Jun 26, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:AllocateIpv6InternetBandwidth

create

*Ipv6InternetBandwidth

acs:vpc:{#regionId}:{#accountId}:ipv6bandwidth/*

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:

  • PayByTraffic: pay-by-data-transfer.

  • PayByBandwidth (default): pay-by-bandwidth.

.

PayByBandwidth

Bandwidth

integer

Yes

The Internet bandwidth of the IPv6 address. Unit: Mbit/s.

  • If InternetChargeType is set to PayByTraffic, the valid values of Internet bandwidth are 1 to 1000.

  • If InternetChargeType is set to PayByBandwidth, the valid values of Internet bandwidth are 1 to 2000.

.

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:

  • true: performs a dry run without actually associating the routing table. The system checks whether your AccessKey pair is valid, whether the Resource Access Management (RAM) user is authorized through authorization, and whether the required parameters are specified. If the check fails, the corresponding error is returned. If the check succeeds, the error code DryRunOperation is returned.

  • false (default): sends a normal request. If the check succeeds, a 2xx HTTP status code is returned and the routing table is associated.

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.