Associates multiple elastic IP addresses (EIPs) with an EIP bandwidth plan.

Usage notes

  • When you call this operation to associate EIPs with an EIP bandwidth plan, make sure that the EIPs meet the following requirements:
    • The EIPs use the pay-as-you-go billing method.
    • The EIPs and the EIP bandwidth plan belong to the same region.
    • The line type of the EIPs is the same as that of the EIP bandwidth plan.
  • The AddCommonBandwidthPackageIps operation is asynchronous. After you send the request, the system returns a request ID. However, the operation is still being performed in the system background. You can call the DescribeCommonBandwidthPackages operation to query the status of an EIP bandwidth plan:
    • If the EIP bandwidth plan is in the BINDING state, the EIPs are being associated with the EIP bandwidth plan. In this state, you can only query the EIP bandwidth plan and cannot perform other operations.
    • If the EIP bandwidth plan is in the BINDED state, the EIPs are associated with the EIP bandwidth plan.

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 AddCommonBandwidthPackageIps

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

RegionId String Yes cn-shanghai

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-2ze2ic1xd2qeqasdf****

The ID of the EIP bandwidth plan.

IpType String No EIP

The type of IP address. Set the value to EIP to associate EIPs with the EIP bandwidth plan.

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

Note If you do not set this parameter, the system uses RequestId as ClientToken. RequestId may be different for each API request.
IpInstanceIds.N String Yes eip-2zeerraiwb7uqwed****

The list of EIPs that you want to associate with the EIP bandwidth plan.

You can specify at most 10 EIP IDs at a time.

Response parameters

Parameter Type Example Description
RequestId String 01FDDD49-C4B7-4D2A-A8E5-A93915C450A6

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddCommonBandwidthPackageIps
&RegionId=cn-shanghai
&BandwidthPackageId=cbwp-2ze2ic1xd2qeqasdf****
&IpType=EIP
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&IpInstanceIds=["eip-2zeerraiwb7uqwed****"]
&Common request parameters

Sample success responses

XML format

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

<AddCommonBandwidthPackageIpsResponse>
    <RequestId>01FDDD49-C4B7-4D2A-A8E5-A93915C450A6</RequestId>
</AddCommonBandwidthPackageIpsResponse>

JSON format

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

{
  "RequestId" : "01FDDD49-C4B7-4D2A-A8E5-A93915C450A6"
}

Error codes

HttpCode Error code Error message Description
400 InvalidIpInstanceId.NotFound The specified Eip InstanceId does not exist in our records. The error message returned because the specified EIP does not exist.
400 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.
400 InvalidBandwidthPackageId.NotFound The specified bandwidthPackageId does not exist in our records. The error message returned because the ID of the specified EIP bandwidth plan does not exist.

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