All Products
Search
Document Center

Elastic IP Address:AllocateEipSegmentAddress

Last Updated:Oct 26, 2026

Contiguous elastic IP addresses (EIPs) are a group of sequentially arranged EIPs. During network design, you can apply for and use these IP addresses in batches for cloud resources that require contiguous public IP addresses. 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. The system first returns the instance ID of the contiguous EIP group, but the group is not yet fully created and the creation task is still running in the background. You can call the DescribeEipSegment operation to query the status of the contiguous EIP group.

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

  • When the contiguous EIP group is in the Allocated state, the 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 generate the value from your client and ensure that the value is unique across different requests. The ClientToken parameter supports only ASCII characters.

Note

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

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

Bandwidth

string

No

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

  • When InternetChargeType is set to PayByBandwidth, valid values for Bandwidth are 1 to 500.

  • When InternetChargeType is set to PayByTraffic, valid values for 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 region IDs.

cn-hangzhou

EipMask

string

Yes

The subnet mask of the contiguous EIPs. Valid values:

  • 28: The system allocates 16 contiguous EIPs per call.

  • 27: The system allocates 32 contiguous EIPs per call.

  • 26: The system allocates 64 contiguous EIPs per call.

  • 25: The system allocates 128 contiguous EIPs per call.

  • 24: The system allocates 256 contiguous EIPs per call.

Note

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

28

Netmode

string

No

The network type. Set the value to public, which indicates the Internet.

public

InternetChargeType

string

No

The billing method of the contiguous EIPs. Valid values:

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

  • PayByTraffic: pay-by-data-transfer.

PayByBandwidth

ResourceGroupId

string

No

The ID of the resource group.

rg-bp67acfmxazb4ph****

Isp

string

No

The line type. Valid values:

  • BGP (default): BGP (Multi-ISP) line. BGP (Multi-ISP) EIPs are supported in all regions.

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

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

If you are a whitelisted 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 an Alibaba Finance Cloud user in the China (Hangzhou) region, 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 list of returned information.

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.