Purchases Internet bandwidth for an IPv6 gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-huhehaote

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

Ipv6GatewayId String Yes ipv6bw-uf6hcyzu65v98v3du****

The ID of the IPv6 gateway.

Ipv6AddressId String Yes ipv6bw-uf6hcyzu65v98v3du****

The ID of the IPv6 gateway.

InternetChargeType String No PayByBandwidth

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

  • PayByTraffic: pay-by-data-transfer
  • PayByBandwidth (default): pay-by-bandwidth
Bandwidth Integer Yes 2

The Internet bandwidth that you want to purchase for the IPv6 gateway. Unit: Mbit/s. Valid values: 1 to 5000.

  • If you set InternetChargeType to PayByBandwidth, the valid values are 1 to 5000.
  • If you set InternetChargeType to PayByTraffic, the valid values vary based on the type of the IPv6 gateway.
    • If you use an IPv6 gateway of Free Edition, which is the default edition, the valid values are 1 to 500.
    • If you use an IPv6 gateway of Enterprise Edition, the valid values are 1 to 1000.
    • If you use an IPv6 gateway of Enhanced Enterprise Edition, the valid values are 1 to 2000.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
Action String Yes AllocateIpv6InternetBandwidth

The operation that you want to perform. Set the value to AllocateIpv6InternetBandwidth.

Response parameters

Parameter Type Example Description
Ipv6AddressId String ipv6bw-uf6hcyzu65v98v3du****

The ID of the IPv6 gateway.

RequestId String 6972A26E-99B1-4367-9890-FBDEBB0F5E7D

The ID of the request.

InternetBandwidthId String ipv6bw-uf6hcyzu65v98v3du****

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

Examples

Sample request

https://vpc.aliyuncs.com/?AllocateIpv6InternetBandwidth
&Ipv6AddressId=ipv6-123456xxxxxxxx
&Ipv6GatewayId=ipv6gw-123456xxxxxxxx
&RegionId=cn-huhehaote
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<AllocateIpv6InternetBandwidthResponse>
	<RequestId>6972A26E-99B1-4367-9890-FBDEBB0F5E7D</RequestId>
	<InternetBandwidthId>2</InternetBandwidthId>
	<Ipv6AddressId>ipv6-hp352ungkzcknxxxxxxxx</Ipv6AddressId>
</AllocateIpv6InternetBandwidthResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "6972A26E-99B1-4367-9890-FBDEBB0F5E7D",
  "InternetBandwidthId" : 2,
  "Ipv6AddressId" : "ipv6-hp352ungkzcknxxxxxxxx"
}

Error codes

HttpCode Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.

For a list of error codes, visit the API Error Center.