Applies for contiguous elastic IP addresses (EIPs).

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 AllocateEipSegmentAddress

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

EipMask String Yes 28

The subnet mask length for the contiguous EIPs. Valid values:

  • 28: applies for 16 contiguous EIPs.
  • 27: applies for 32 contiguous EIPs.
  • 26: applies for 64 contiguous EIPs.
  • 25: applies for 128 contiguous EIPs.
  • 24: applies for 256 contiguous EIPs.
Note The number of contiguous EIPs allocated by the system may be less than the requested number because one, three, or four EIPs may be reserved.
RegionId String Yes cn-hangzhou

The region ID of the contiguous EIPs. You can call the DescribeRegions operation to query the most recent region list.

ClientToken String No 02fb3da4-130e-11e9-8e44-001****

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 token can contain only ASCII characters and cannot exceed 64 characters in length.

Bandwidth String No 5

The bandwidth limit of the EIPs. Valid values:

  • 1 to 200 if the metering method is pay-by-data-transfer. Unit: Mbit/s.
  • 1 to 500 if the metering method is pay-by-bandwidth. Unit: Mbit/s.

Default value: 5.

Netmode String No public

The network type. Valid values:

  • public (default): the Internet. After contiguous EIPs are associated with cloud resources, the cloud resources can access the Internet by using the EIPs.
  • hybrid: a hybrid cloud. After contiguous EIPs are associated with cloud resources, the cloud resources can access the hybrid cloud by using the EIPs.
Note This network type is available only to users who are included in the whitelist. To use this network type, contact your customer business manager.
InternetChargeType String No PayByBandwidth

The metering method of the contiguous EIPs. Valid values:

  • PayByBandwidth (default): pay-by-bandwidth.
  • PayByTraffic: pay-by-data-transfer.
Note If the Netmode parameter is set to hybrid, you can set InternetChargeType only to PayByBandwidth.
ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the contiguous EIPs belong.

Response parameters

Parameter Type Example Description
EipSegmentInstanceId String eipsg-2zett8ba055tbsxme****

The ID of the contiguous EIP group.

OrderId Long 20190000

The ID of the order.

RequestId String F7A6301A-64BA-41EC-8284-8F4838C15D1F

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AllocateEipSegmentAddress
&EipMask=28
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<AllocateEipSegmentAddressResponse>
      <RequestId>F7A6301A-64BA-41EC-8284-8F4838C15D1F</RequestId>
      <EipSegmentInstanceId>eipsg-2zett8ba055tbsxme****</EipSegmentInstanceId>
      <OrderId>20190000</OrderId>
</AllocateEipSegmentAddressResponse>

JSON format

{
    "RequestId":"F7A6301A-64BA-41EC-8284-8F4838C15D1F",
    "EipSegmentInstanceId":"eipsg-2zett8ba055tbsxme****",
    "OrderId":"20190000"
}

Error codes

HttpCode Error code Error message Description
403 Forbbiden User not authorized to operate on the specified resource. The error message returned because you are unauthorized to perform the operation on the specified resource. Apply for the required permissions and try again.
400 QuotaExceeded.Eip Elastic IP address quota exceeded The error message returned because the number of EIPs has reached the quota. Submit a ticket to request a quota increase. We recommend that you use NAT gateways.
400 InvalidParameter Specified value of "InternetChargeType" is not valid The error message returned because InternetChargeType is set to an invalid value.
400 InvalidParameter Specified value of "Bandwidth" is not valid. The error message returned because the specified bandwidth value is invalid.
400 InsufficientBalance Your account does not have enough balance. The error message returned because your account balance is insufficient. Top up your account and try again.
400 QuotaExceeded.Eip Elastic IP address quota exceeded. The error message returned because the number of EIPs has reached the quota. Submit a ticket to request a quota increase. We recommend that you use NAT gateways.
400 ReserveIpFail Reserve eip failed. The error message returned because the system failed to reserve the specified EIP.
400 InvalidRegion.NotSupport The specified region does not support. The error message returned because the specified region does not support this operation.
400 InvalidResourceGroupId The specified ResourceGroupId does not exist. The error message returned because the specified resource group ID does not exist.
409 OperationConflict Request was denied due to conflict with a previos request. The error message returned because a request conflict occurred. Try again later or submit a ticket to report the problem.
400 ORDER.QUANTITY_INVALID User quota has exceeded the limit. The error message returned because the number of EIPs that you own has reached the upper limit. Go to the Quota Management page and request a quota increase.

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