All Products
Search
Document Center

Elastic IP Address:AllocateEipSegmentAddress

Last Updated:Jul 10, 2026

Contiguous Elastic IP addresses (EIPs) are a group of sequentially ordered EIPs. You can apply for and use these IP addresses in bulk for cloud resources that require contiguous public IP addresses during network design. You can call the AllocateEipSegmentAddress operation to apply for contiguous EIPs.

Note

This API has been deprecated with no replacement. While temporary access is maintained, no further updates or bug fixes will be provided. To ensure continued functionality, plan your migration and contact your account manager for support.

Operation description

The AllocateEipSegmentAddress operation is asynchronous. After you call this operation, the system returns the instance ID of a contiguous EIP group, but the contiguous EIP group is not yet created. The creation task is still running in the background. You can call DescribeEipSegment to query the status of the contiguous EIP group.

  • If the contiguous EIP group is in the Allocating state, the contiguous EIP group is being allocated. In this state, you can only perform query operations.

  • If the contiguous EIP group is in the Allocated state, the contiguous EIP group is allocated.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:AllocateEipSegmentAddress

create

*SegmentAddress

acs:vpc:{#regionId}:{#accountId}:eip/*

None None

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

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 ClientToken value can contain only ASCII characters.

Note

If you do not specify this parameter, the system uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request.

02fb3da4-130e-11e9-8e44-001****

Bandwidth

string

No

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

  • If InternetChargeType is set to PayByBandwidth, valid values of Bandwidth are 1 to 500.

  • If InternetChargeType is set to PayByTraffic, valid values of Bandwidth are 1 to 200.

Default value: 5 Mbit/s.

5

RegionId

string

Yes

The region ID of the contiguous EIPs.

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

cn-hangzhou

EipMask

string

Yes

The subnet mask of the contiguous EIPs. Valid values:

  • 28: The system allocates 16 contiguous EIPs for each call.

  • 27: The system allocates 32 contiguous EIPs for each call.

  • 26: The system allocates 64 contiguous EIPs for each call.

  • 25: The system allocates 128 contiguous EIPs for each call.

  • 24: The system allocates 256 contiguous EIPs for each call.

Note

Due to IP address reservation, the actual number of contiguous EIPs may be 1, 3, or 4 fewer than expected.

28

Netmode

string

No

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

public

InternetChargeType

string

No

The billable methods of the contiguous EIPs. Valid values:

  • PayByBandwidth (default): pay-by-fixed-bandwidth.

  • PayByTraffic: pay-by-data-transfer.

PayByBandwidth

ResourceGroupId

string

No

The resource group ID.

rg-bp67acfmxazb4ph****

Isp

string

No

The line type. Valid values:

  • BGP (default): BGP (multi-ISP) line. All regions support BGP (multi-ISP) EIPs.

  • BGP_PRO: BGP (multi-ISP) premium line. Only Hong Kong (China), Singapore, Tokyo (Japan), Kuala Lumpur (Malaysia), Manila (Philippines), Jakarta (Indonesia), and Bangkok (Thailand) regions support BGP (multi-ISP) premium EIPs.

For more information about BGP (multi-ISP) lines and BGP (multi-ISP) premium lines, see EIP line types.

If you are a whitelist user of single-ISP bandwidth, you can also select the following types:

  • ChinaTelecom: China Telecom

  • ChinaUnicom: China Unicom

  • ChinaMobile: China Mobile

  • ChinaTelecom_L2: China Telecom L2

  • ChinaUnicom_L2: China Unicom L2

  • ChinaMobile_L2: China Mobile L2

If you are a China (Hangzhou) Finance Cloud user, this parameter is required. Set the value to BGP_FinanceCloud.

BGP

Zone

string

No

The zone of the contiguous EIP group.

cn-hangzhou-a

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

EipSegmentInstanceId

string

The instance ID of the contiguous EIP group.

eipsg-2zett8ba055tbsxme****

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 QuotaExceeded.Eip Elastic IP address quota exceeded
400 InsufficientBalance Your account does not have enough balance.
400 InvalidParameter Specified value of "InternetChargeType" is not valid
400 ReserveIpFail Reserve eip failed.
400 InvalidBandwidth.Malformed The specified Bandwidth is invalid.
400 INSTANCE_TYPE_NOT_SUPPORT The instance type is invalid.
400 QueryParameter.Illegal query parameter illegal
400 TokenVerfiy.Failed token verify failed.
400 QuotaExceeded.LargeSpecEip Elastic IP address with large spec quota exceeded.
400 InvalidResourceGroupId The specified ResourceGroupId does not exist. The specified resource group ID does not exist.
400 OperationFailed.InsufficientEIP Eip resource is not enough.
400 FrequentPurchase.EIP eip frequent purchase
400 OperationFailed.ChargeTypeInvalid Operation failed because hybrid netmode do not support PayByTraffic.
400 IllegalParam.EipMask EipMask is illegal.
400 IllegalParam.Name Name is illegal.
400 IllegalParam.Description Description is illegal.
400 InstanceExist.EipSegment The eipSegment instance already exists.
400 OperationFailed.QuotaExceed Operation failed because over threshold bandwidth quota exceed.
400 OperationFailed.FrequentPurchase Operation failed because eip frequent purchase.
400 OperationFailed.AllocateEipSegment Operation failed because eip segment is out of stock. Insufficient inventory of continuous EIP.
400 OperationFailed.CreateOrderFailed Operation failed because create order failed.
400 MissingParam.Bandwidth The parameter Bandwidth is mandatory when allocate hybrid EipSegment.
400 OperationFailed.EipQuotaExceed Operation failed because eip quota exceed.
400 Forbidden User not authorized to operate on the specified resource.
400 UnsupportedFeature.AllocateEipAddressWithZone The feature of AllocateEipAddressWithZone is not supported. You are not allowed to create an instance in a specified zone in the region.
400 IllegalParam.Zone The specified zone is invalid. Zone is set to an invalid value.
400 Forbidden.AllocateEipSegmentAddress Authentication is failed for allocating eip segment address. Failed to apply for continuous EIP. The service has been offline. Please use the IP address pool service.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.