AllocateIpv6InternetBandwidth

更新时间:
复制 MD 格式

Invokes the AllocateIpv6InternetBandwidth operation to allocate Internet bandwidth for an IPv6 address in a VPC to enable public network communication. After the bandwidth is allocated, the IPv6 address can both initiate outbound access to the Internet and be accessed from the Internet.

Operation description

  • You can allocate public Internet bandwidth for the following types of IPv6 addresses:
    • IPv6 addresses assigned to elastic network interfaces (ENIs) of ECS instances.

    • Idle IPv6 addresses that are not associated with any resource instances.

  • 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 idle IPv6 address has been created by calling AllocateIpv6Address.

  • After the bandwidth is allocated, 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 public Internet bandwidth for the same IPv6 address.

  • Scenarios:
    • Public Internet access for ECS instances over IPv6: Enables ECS instances to access the Internet or provide services over IPv6.

    • Public access for idle IPv6 addresses: 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 the IPv6 Internet bandwidth. Valid values:

  • PayByTraffic: pay-by-data-transfer.

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

  • PayByOld95: traditional 95th percentile billing. IPv6 Internet bandwidth does not support traditional 95th percentile billing by default. To use this billing method, contact your account manager.

PayByBandwidth

Bandwidth

integer

Yes

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

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

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

  • If InternetChargeType is set to PayByOld95, the valid values 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 of the API request 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 associating a prefix list with a route table. The system checks the AccessKey pair, the authorization of the Resource Access Management (RAM) user, and the required parameters. 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 prefix list is associated with the route table.

false

ClientToken

string

No

客户端 Token,用于保证请求的幂等性。

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

Note

若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。

123e4567-e89b-12d3-a456-426655440000

RegionId

string

Yes

IPv6 网关的地域 ID。您可以通过调用 DescribeRegions 接口获取地域 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 the 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. 当前指定的Bandwidth非法,请参考API文档参数说明修改后重试
400 MissingParam.Ipv6InstanceId The param of Ipv6InstanceId is missing. Ipv6InstanceId未指定
400 InvalidIpv6Instance.NotFound The specified Ipv6AddressId or Ipv6InternetBandwidthId is not found.
400 IllegalParam.ChargeType The param of %s is illegal. 您输入的ChargeType非法,请参考API文档参数说明修改后重试
400 IllegalParam.InternetChargeType The param of %s is illegal. 您指定的InternetChargeType非法,请参考API文档参数说明修改后重试
400 OperationUnsupported.PrePaid %s is unsupported. Ipv6公网带宽不支持预付费,请参考API文档参数说明修改后重试
400 OperationFailed.Ipv6GatewayDisMatchIpv6Address The operation is failed because of %s. 您所指定的Ipv6AddressIpv6Gateway不在同一VPC内,请确认您的输入是否正确
400 OperationFailed.InternetBandwidthAlreadyExisted The operation is failed because of %s. 您当前操作的Ipv6实例已开通公网带宽,请勿重复开通
400 OperationFailed.Ipv6GatewayNotExist The operation is failed because of %s. 您当前操作的Ipv6地址所在的VPC不存在Ipv6Gateway实例,请创建Ipv6Gateway再进行该操作
400 IncorrectStatus.Ipv6Instance The status of %s [%s] is incorrect. 您指定的Ipv6Instance实例处于非稳态,请稍后重试
400 IllegalParam.Ipv6Address The param of %s is illegal. 您指定的ipv6地址非法,请检查您的输入是否正确
400 UnsupportedFeature.InternetChargeTypeOnFreeIpv6Address The feature of %s is not supported. 当前Ipv6实例为游离态,不支持所指定的付费类型,请参考API文档参数说明修改后重试
400 UnsupportedFeature.InternetChargeTypeOnStaticIsp The feature of %s is not supported. 当前指定Ipv6实例为单线ISP实例,不支持所指定的付费类型,请参考API文档参数说明修改后重试
400 OperationUnsupported.ULA %s is unsupported. 当前操作不支持ULA地址
400 OperationFailed.OpenCdtServiceFirst The operation is failed because of %s. 您当前指定的计费类型需开通CDT计费,请开通CDT后重试
400 OperationFailed.UpgradeCdtServiceFirst The operation is failed because of cdt is not upgraded. 您当前指定购买的实例类型需升级CDT计费,请升级CDT后重试
400 OperationUnsupported.PrivateGUA This operation does not support private GUA addresses. 当前操作不支持私网GUA地址。
400 OperationDenied.UnSupportedBindTypeCloudInstance Internet bandwidth cannot be allocated to the IPv6 address bound to the cloud service instance. 绑定云服务类型实例的ipv6 ip 不能开通公网带宽。
500 OperationFailed.QueryAccountInfo Query account info failed when create order. 下单时查询账号信息失败
500 OperationFailed.SaleValidate Validate sale condition with subArticle failed.
500 SystemBusy 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. 您指定的Ipv6Address不存在,请检查您的输入是否正确

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.