Sets the maximum bandwidth of an elastic IP address (EIP) that is associated with an EIP bandwidth plan.

Usage notes

You can call the ModifyCommonBandwidthPackageIpBandwidth operation to set the maximum bandwidth of an EIP that is associated with an EIP bandwidth plan. This prevents an EIP from exhausting the bandwidth resources of an EIP bandwidth plan.

For example, two EIPs are associated with an EIP bandwidth plan whose maximum bandwidth is 800 Mbit/s. In this case, you can set the maximum bandwidth of one EIP to 500 Mbit/s and that of the other EIP to 400 Mbit/s. After you set the maximum bandwidth values, the first EIP cannot consume bandwidth higher than 500 Mbit/s. The second EIP cannot consume bandwidth higher than 400 Mbit/s.

When you call this operation, take note of the following items:

  • This operation is valid only for EIPs that are associated with Elastic Compute Service (ECS) instances. This operation is invalid for EIPs that are associated with Server Load Balancer (SLB) instances, NAT gateways, secondary elastic network interfaces (ENIs), or high-availability virtual IP addresses (HAVIPs).
  • This operation is in public preview. You can call this operation to set the maximum bandwidth of EIPs only if the EIPs are associated with an EIP bandwidth plan. The feature is not supported in the console.
  • You cannot repeatedly call this operation to set the maximum bandwidth of an EIP within the specified period of time.

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
Action String Yes ModifyCommonBandwidthPackageIpBandwidth

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

RegionId String Yes cn-hangzhou

The region ID of the EIP bandwidth plan. You can call the DescribeRegions operation to query the most recent region list.

BandwidthPackageId String Yes cbwp-2zep6hw5d6y8exscd****

The ID of the EIP bandwidth plan.

EipId String Yes eip-2zewysoansu0svfbg****

The ID of the EIP that is associated with the EIP bandwidth plan.

Bandwidth String Yes 500

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

Response parameters

Parameter Type Example Description
RequestId String 63D187BF-A30A-4DD6-B68D-FF182C96D8A2

The ID of the request.

Examples

Sample requests

http(s)://vpc.aliyuncs.com/?Action=ModifyCommonBandwidthPackageIpBandwidth
&Bandwidth=500
&BandwidthPackageId=cbwp-2zep6hw5d6y8exscd****
&EipId=eip-2zewysoansu0svfbg****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<ModifyCommonBandwidthPackageIpBandwidth>
	<RequestId>63D187BF-A30A-4DD6-B68D-FF182C96D8A2</RequestId>
</ModifyCommonBandwidthPackageIpBandwidth>

JSON format

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

{
  "RequestId" : "63D187BF-A30A-4DD6-B68D-FF182C96D8A2"
}

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.