Removes public IP addresses from a NAT bandwidth package.

Before you call RemoveBandwidthPackageIps to delete public IP addresses, note the following:
  • You cannot delete all public IP addresses in the NAT bandwidth package.

  • You cannot delete an IP address that is not included in the target NAT bandwidth package.

  • You cannot delete an IP address occupied by a DNAT entry or SNAT entry.

Note This API can be called only if you purchased a NAT bandwidth package before January 26, 2018. If your account does not have a NAT bandwidth package purchased before January 26, 2018, you need to associate an EIP.

For more information, see AssociateEipAddress .

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes RemoveBandwidthPackageIps

The name of the action. Value:

RemoveBandwidthPackageIps

BandwidthPackageId String Yes bwp-s6lmotmkk

The ID of the NAT bandwidth package.

RegionId String Yes cn-hangzhou

The ID of the region to which the NAT bandwidth package belongs.

To query the region ID, call DescribeRegions.

RemovedIpAddresses.n String Yes 116.62.222.28

The ID of the public IP address to be deleted. Value range of n: 1 to 20.

ClientToken String No SHAww112344jhsw233

A client token used to guarantee the idempotence of requests.

This parameter value is generated by the client and must be unique. It cannot exceed 64 ASCII characters.

Response parameters

Parameter Type Example value Description
RequestId String 7D275A59-1EB0-4775-8A20-2A47055EAC5C The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=RemoveBandwidthPackageIps
&BandwidthPackageId=bwp-s6lmotmkk
&RegionId=cn-hangzhou
&RemovedIpAddresses.1=116.62.222.28
&<CommonParameters>
			
Response example
  • XML format

    <RemoveBandwidthPackageIpsResponse>
      <RequestId>7D275A59-1EB0-4775-8A20-2A47055EAC5C</RequestId>
    </RemoveBandwidthPackageIpsResponse>
    					
  • JSON format

    {
    	"RequestId":"7D275A59-1EB0-4775-8A20-2A47055EAC5C"
    }

Error codes

HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified region ID does not exist.
404 invalidRemovedIpAddresses.NotFound Some of the specified value of RemovedIpAddress not found in specified BandwidthPackage. Some IP addresses in the IP address list are not in the shared bandwidth package. Check these IP addresses.
400 InvalidIpCount.ValueNotSupported Can not remove all ips of the bandwidthPackage. You cannot remove all IP addresses in the bandwidth package.
400 InvalidRemovedIpAddresses.NotFound Some of remove ip is not natPublicIp. Some specified IP addresses are not public IP addresses of the NAT Gateway and cannot be removed.
400 DependencyViolation.ForwardEntry The ip has been used by ForwardEntry. The IP address is being used by a forwarding rule. Delete the rule first.
400 DependencyViolation.SnatEntry The ip has been used by SnatEntry. The IP address is being used by an SNAT rule. Delete the rule first.
404 BandwidthPackage.FinancialLocked The specified BandwidthPackage has been Financail Lock. The bandwidth package is locked due to insufficient balance.

See common error codes