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
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.

Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
Action String No AllocateEipSegmentAddress

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

Bandwidth String No 5

The maximum bandwidth of the EIP. Unit: Mbit/s.

  • When InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByBandwidth, valid values for Bandwidth are 1 to 500.
  • When InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByTraffic, valid values for Bandwidth are 1 to 200.
  • When InstanceChargeType is set to PrePaid, 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 EIPs. 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

The network type. Valid values:

  • public (default): 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 hybrid clouds 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.

Isp String No BGP

The line type. You can set this parameter only when you create pay-as-you-go EIPs. Valid values:

  • BGP: BGP (Multi-ISP) lines

    Up to 89 high-quality BGP lines are available worldwide. Direct connections with multiple Internet service providers (ISPs), including China Telecom, China Unicom, China Mobile, China Mobile Tietong, China Netcom, CERNET, China Broadcast Network, Dr. Peng Group, and Founder, can be established in all regions in mainland China.

  • BGP_PRO: BGP (Multi-ISP) Pro lines

    BGP (Multi-ISP) Pro lines optimize data transmission to mainland China and improve connection quality for international services. Compared with BGP (Multi-ISP), when BGP (Multi-ISP) Pro lines provide services to users in mainland China (excluding data centers), cross-border connections are established by using mainland China ISP services. This reduces network latency.

    BGP (Multi-ISP) lines are supported in all regions. BGP (Multi-ISP) Pro lines are supported only in the China (Hong Kong) region.

Note If your Alibaba Cloud account is included in the BGP (single line) whitelist, you can set the Isp parameter to ChinaTelecom, ChinaUnicom, or ChinaMobile. If your workloads are deployed in China East 1 Finance, this parameter is required and you must set the value to BGP_FinanceCloud.

Response parameters

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

The ID of the request.

OrderId Long 20190000

The ID of the order.

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
&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>
    <OrderId>20190000</OrderId>
    <EipSegmentInstanceId>eipsg-2zett8ba055tbsxme****</EipSegmentInstanceId>
</AllocateEipSegmentAddressResponse>

JSON format

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

{
  "RequestId" : "F7A6301A-64BA-41EC-8284-8F4838C15D1F\t",
  "OrderId" : 20190000,
  "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 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 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 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 is invalid.
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.
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 permissions and try again.
409 OperationConflict Request was denied due to conflict with a previos request. The error message returned because your request is conflicting with another request. Try again later.

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