Applies for contiguous elastic IP addresses (EIPs).

Usage notes

AllocateEipSegmentAddress 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 DescribeEipSegment operation to query the status of the task:

  • If the contiguous EIP group is in the Allocating state, the EIPs are being allocated. In this case, you can only perform the query operation and cannot perform other operations.
  • If the contiguous EIP group is in the Allocated state, the EIPs are allocated.

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
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 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.
Action String Yes AllocateEipSegmentAddress

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

Bandwidth String No 5

The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s.

  • When InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByBandwidth, the valid values for Bandwidth are 1 to 500.
  • When InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByTraffic, the valid values for Bandwidth are 1 to 200.
  • When InstanceChargeType is set to PrePaid, the valid values for Bandwidth are 1 to 1000.

Default value: 5. Unit: Mbit/s.

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.

EipMask String Yes 28

The subnet mask length for the contiguous EIP group. Valid values:

  • 28: applies for 16 contiguous EIPs in each call.
  • 27: applies for 32 contiguous EIPs in each call.
  • 26: applies for 64 contiguous EIPs each call.
  • 25: applies for 128 contiguous EIPs in each call.
  • 24: applies for 256 contiguous EIPs in each call.
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.
Netmode String No public

Set the value to public, which specifies the public network type.

InternetChargeType String No PayByBandwidth

The metering method of the contiguous EIPs. Valid values:

  • PayByBandwidth (default): pay-by-bandwidth
  • PayByTraffic: pay-by-data-transfer
ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the contiguous EIP group belongs.

Isp String No BGP

The line type. Valid values:

  • BGP (default): BGP (Multi-ISP) lines All regions support BGP (Multi-ISP) EIPs.
  • BGP_PRO: BGP (Multi-ISP) Pro lines Only the following regions support BGP (Multi-ISP) Pro lines: China (Hong Kong), Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

For more information about BGP (Multi-ISP) and BGP (Multi-ISP) Pro, see EIP line types.

If you are allowed to use single-ISP bandwidth, you can also choose one of the following values:

  • ChinaTelecom
  • ChinaUnicom
  • ChinaMobile
  • ChinaTelecom_L2
  • ChinaUnicom_L2
  • ChinaMobile_L2

If your services are deployed in China East 1 Finance, this parameter is required and you must set the value to BGP_FinanceCloud.

Zone String No cn-hangzhou-a

The zone of the contiguous EIP group.

Response parameters

Parameter Type Example Description
RequestId String F7A6301A-64BA-41EC-8284-8F4838C15D1F

The request ID.

EipSegmentInstanceId String eipsg-2zett8ba055tbsxme****

The ID of the contiguous EIP group.

Examples

Sample requests

http(s)://[Endpoint]/?ClientToken=02fb3da4-130e-11e9-8e44-001****
&Action=AllocateEipSegmentAddress
&Bandwidth=5
&RegionId=cn-hangzhou
&EipMask=28
&Netmode=public
&InternetChargeType=PayByBandwidth
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Isp=BGP
&Zone=cn-hangzhou-a
&Common request parameters

Sample success responses

XML format

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

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

JSON format

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

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

Error codes

HttpCode Error code Error message Description
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 you do not have sufficient balance in your Alibaba Cloud account. Top up your Alibaba Cloud account and try again.
400 QuotaExceeded.Eip Elastic IP address quota exceeded. The error message returned because the number of EIPs has reached the upper limit. We recommend that you use NAT gateways if you want to use more EIPs.
400 ReserveIpFail Reserve eip failed. The error message returned because the system failed to reserve the specified EIPs.
400 InvalidRegion.NotSupport The specified region does not support. The error message returned because the operation is not supported in the specified region.
400 InvalidResourceGroupId The specified ResourceGroupId does not exist. The error message returned because the specified resource group ID does not exist.
400 OperationFailed.RiskControl Risk control check failed. The error message returned because security risks are detected in your payment method. Click the link in the email or the link in the console message to continue with the verification. After you complete the verification, submit the order again.
400 ORDER.QUANTITY_INVALID User quota has exceeded the limit. The error message returned because the number of EIPs that you have created has reached the upper limit. Go to the Quota Management page to request a quota increase.
400 OrderError.EIP The Account failed to create order. The error message returned because the system failed to generate an order.
400 OperationConflict Request was denied due to conflict with a previous request. The error message returned because your request is conflicting with another request. Try again later.
400 Forbidden User not authorized to operate on the specified resource. The error message returned because you do not have permissions to perform the operation on the specified resource. Acquire the required permissions and try again.
500 InternalError The request processing has failed due to some unknown error, exception or failure. The error message returned because an internal error has occurred.

For a list of error codes, see Service error codes.