All Products
Search
Document Center

Virtual Private Cloud:AddCommonBandwidthPackageIp

Last Updated:Mar 04, 2024

Associates an elastic IP address (EIP) with an Internet Shared Bandwidth instance.

Operation description

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

  • When you call this operation to associate an EIP with an Internet Shared Bandwidth instance, make sure that the EIP meets the following requirements:

    • The EIP uses the pay-as-you-go billing method.
    • The EIP and the Internet Shared Bandwidth instance belong to the same region.
    • The line type of the EIPs is the same as that of the Internet Shared Bandwidth instance.
  • AddCommonBandwidthPackageIp is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeCommonBandwidthPackages operation to query the status of the operation.

    • If the Internet Shared Bandwidth instance is in the BINDING state, the EIP is being associated with the Internet Shared Bandwidth instance. In this state, you can only query the Internet Shared Bandwidth instance and cannot perform other operations.
    • If the Internet Shared Bandwidth instance is in the BINDED state, the EIP is associated with the Internet Shared Bandwidth instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:AddCommonBandwidthPackageIpWrite
  • BandwidthPackage
    acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#BandwidthPackageId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Internet Shared Bandwidth instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
BandwidthPackageIdstringYes

The ID of the Internet Shared Bandwidth instance.

cbwp-2ze2ic1xd2qeqasdf****
IpInstanceIdstringYes

The EIP ID.

You can call the DescribeEipAddresses operation to query EIP IDs.

eip-2zeerraiwb7uqwed****
IpTypestringNo

The type of IP address. Set the value to EIP to associate EIPs with the Internet Shared Bandwidth instance.

EIP
ClientTokenstringNo

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

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
0c593ea1-3bea-11e9-b96b-88e9fe637760

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

01FDDD49-C4B7-4D2A-A8E5-A93915C450A6

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400OperationDenied.SecurityProtectionTypesInconsistentThe operation is not allowed because of SecurityProtectionTypesInconsistent.-
400IpInstanceId.AlreadyInBandwidthPackageThe specified Eip InstanceId already in bandwidthPackage.The specified Eip InstanceId already in bandwidthPackage.
400IpInstanceId.BizStatusInvalidThe specified Eip BizStatus is Disable, Cannot add to bandwidthPackage.-
400IpInstanceId.ChargeType.NotSupportThe specified Eip instance is PrePaid type, Cannot add to BandwidthPackage.-
400BandwidthPackageId.InvalidBizStatusThe specified BandwidthPackageId has been FinancialLocked, Cannot add Ip.-
400IpInstanceId.QuotaExceededThe specified BandwidthPackageId has too many ip in it. exceed the quota , Cannot add more.-
400EipOperation.TooFrequentlyThe specified Eip add into bandwidthPackage too frequently. please add later.-
400TaskConflictThe operation is too frequent, TaskConflict.The system is unavailable. Try again later.
400IncorrectStatus.EipEip status error.-
400OperationUnsupported.IpTypeIp type does not support the operation.-
400ParamExclusive.IpInstanceIdAndBandwidthPackageId%s-
400InvalidBandwidthPackage.NotExistEip bandwidth package not exist.-
400OperationFailed.DistibuteLockDistibute lock fail.-
400OperationFailed.ZoneIdInconsistent%s-
400AttrMismatching.BandwidthPackageIpVersion%s-
400InvalidBandwidthPackageId.NotFoundThe specified BandwidthPackageId not exist.-
400InvalidInstanceId.NotFoundThe InstanceId is not found.The InstanceId is not found.
400InvalidEIPStatus.BizDisabledThe EIP has been locked.The error message returned because the EIP is locked.
400Forbidden.FinancialLockedThe ip business status is invalid.The error message returned because the instance has overdue payments.
400Mismatch.CloudBoxCbwpZoneAndEipZoneThe CbwpZone and EipZone are mismatched.The EIP bandwidth plan of the cloud box does not match the zone of the EIP.
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
404InvalidBandwidthPackageId.NotFoundThe specified bandwidthPackageId does not exist in our records.The ID of the specified EIP bandwidth plan does not exist.
404InvalidIpInstanceId.NotFoundThe specified Eip InstanceId does not exist in our records.The specified EIP does not exist.
404IpInstanceId.InvalidIpInternetChargeTypeThe hybrid type eip not support add into bandwidthPackage of PayBytraffic type.-
404BandwidthPackageId.InvalidBandwidthThe hybrid type eip can not add into low bandwidth bandwidthPackage.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404