All Products
Document Center

Elastic IP Address:AllocateEipSegmentAddress

Last Updated:Jul 10, 2024

Contiguous elastic IP addresses (EIPs) are arranged in sequence. You can assign contiguous EIPs to instances as needed. You can call AllocateEipSegmentAddress to request contiguous EIPs.

Operation description

AllocateEipSegmentAddress is an asynchronous operation. After a request is sent, the system returns the ID of a contiguous EIP group 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.


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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters


The client token that is used to ensure the idempotence of the request.

You can use the client to generate a token, but you must make sure that the token is unique among different requests. ClientToken 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.

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

  • Valid values when InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByBandwidth: 1 to 500.****
  • Valid values when InstanceChargeType is set to PostPaid and InternetChargeType is set to PayByTraffic: 1 to 200.****
  • Valid values when InstanceChargeType is set to PrePaid: 1 to 1000.****

Default value: 5. Unit: Mbit/s.


The ID of the region in which the contiguous EIP group resides.

You can call the DescribeRegions operation to query the region ID.


The subnet mask of 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 in each call.
  • 25: applies for 128 contiguous EIPs in each call.
  • 24: applies for 256 contiguous EIPs in each call.
Note Some IP address are reserved for specific purposes. Therefore, the actual number of the contiguous EIPs may be one, three, or four less than the expected number.

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


The metering method of the contiguous EIP group. Valid values:

  • PayByBandwidth (default)
  • PayByTraffic

The resource group ID.


The line type. Valid values:

  • BGP (default): BGP (Multi-ISP) line The BGP (Multi-ISP) line is supported in all regions.
  • BGP_PRO: BGP (Multi-ISP) Pro line BGP (Multi-ISP) Pro line is supported only in the China (Hong Kong), Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok) regions.

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

If you are allowed to use single-ISP bandwidth, you can also use 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 parameter to BGP_FinanceCloud.


The zone of the contiguous EIP group.


Response parameters


The response parameters.


The request ID.


The ID of the contiguous EIP group.



Sample success responses


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

Error codes

HTTP status codeError codeError messageDescription
400COMMODITY_NO_EXISTcommodity is not exist-
400QuotaExceeded.EipElastic IP address quota exceeded-
400InvalidParameterSpecified value of "InternetChargeType" is not valid-
400InvalidParameterSpecified value of "Bandwidth" is not valid.The specified bandwidth value is invalid.
400InsufficientBalanceYour account does not have enough balance.Your account balance is insufficient. Top up your account and try again.
400QuotaExceeded.EipElastic IP address quota exceeded.The number of EIPs has reached the upper limit. We recommend that you use NAT gateways if you want to use more EIPs.
400ReserveIpFailReserve eip failed.The system failed to reserve the specified EIP.
400InvalidRegion.NotSupportThe specified region does not support.The specified region does not support.
400InvalidBandwidth.MalformedThe specified Bandwidth is invalid.-
400INSTANCE_TYPE_NOT_SUPPORTThe instance type is invalid.-
400QueryParameter.Illegalquery parameter illegal-
400TokenVerfiy.Failedtoken verify failed.-
400OrderFailedThe Account failed to create order.-
400QuotaExceeded.LargeSpecEipElastic IP address with large spec quota exceeded.-
400InvalidResourceGroupIdThe specified ResourceGroupId does not exist.The specified resource group ID does not exist.
400PAYFOR.CREDIT_PAY_INSUFFICIENT_BALANCEYour account does not have enough balance.-
400SYSTEM.SALE_VALIDATE_UNEXPECTED_ERRORYou have arrears and do not meet the purchase conditions.-
400Trade_Sync_Create_Sub_ERRORSyncOrderToSub error.-
400InvalidComponent.EipBandwidthMaxThe eip_bandwidth_max component is invalid.-
400OperationFailed.RiskControlRisk control check failed.The error message returned because your payment method has security risks. Click the link for verification in your email or console message and submit your order after verification.
400OperationFailed.SaleValidateValidate sale condition with subArticle failed.Failed to validate the sales condition with a subproject.
400IllegalParam.OrderParamComponentProduct order param has invalid component.-
400OperationFailed.SaleExpressionGet the sales expression exception attached to the item.-
400OperationFailed.CompleteUserInfoComplete user info failed.-
400OperationFailed.QueryPriceQuery price failed when create order.Failed to query the price when creating the order.
400OperationFailed.InsufficientEIPEip resource is not enough.-
400OperationFailed.InvokeInnerApiFailed to invoke inner api.-
400OperationFailed.AccountMoneyInvalidAccount money is invalid.-
400OperationFailed.QueryCredtiInfoFailed to query credit info.-
400FrequentPurchase.EIPeip frequent purchase-
400OperationFailed.QueryUserLabelFailed to query user label info.-
400PAY.INSUFFICIENT_BALANCEYour account does not have enough balance.-
400ORDER.QUANTITY_INVALIDUser quota has exceeded the limit.The maximum number of EIPs you maintain is exceeded. You can go to quota management to increase the upper limit of EIPs.
400PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGALUser withhoding argeement is illegal.-
400OperationFailed.ChargeTypeInvalidOperation failed because hybrid netmode do not support PayByTraffic.-
400IllegalParam.EipMaskEipMask is illegal.-
400IllegalParam.NameName is illegal.-
400IllegalParam.DescriptionDescription is illegal.-
400InstanceExist.EipSegmentThe eipSegment instance already exists.-
400OperationFailed.QuotaExceedOperation failed because over threshold bandwidth quota exceed.-
400OperationFailed.FrequentPurchaseOperation failed because eip frequent purchase.-
400OperationFailed.AllocateEipSegmentOperation failed because eip segment is out of stock.-
400OperationFailed.CreateOrderFailedOperation failed because create order failed.-
400MissingParam.BandwidthThe parameter Bandwidth is mandatory when allocate hybrid EipSegment.-
400OperationFailed.EipQuotaExceedOperation failed because eip quota exceed.-
400OrderError.EIPThe Account failed to create order.Failed to place the order.
400OperationConflictRequest was denied due to conflict with a previous request.The request conflicts with another one. Try again later.
400ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
400UnsupportedFeature.AllocateEipAddressWithZoneThe feature of AllocateEipAddressWithZone is not supported.You are not allowed to create an instance in a specified zone in the region.
400IllegalParam.ZoneThe specified zone is invalid.Zone is set to an invalid value.
404InvalidRegionId.NotFoundSpecified value of "RegionId" is not supported.RegionId is set to an invalid value. Check whether the service is available in the specified region and try again.
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId parameter is set to an invalid value. Specify a valid value and try again.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error occurred.

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

Change history

Change timeSummary of changesOperation
2023-08-29The Error code has changedView Change Details
2023-07-26API Description Update. The Error code has changedView Change Details
2023-05-22The Error code has changed. The request parameters of the API has changedView Change Details
2023-03-17The Error code has changed. The response structure of the API has changedView Change Details