All Products
Search
Document Center

Elastic IP Address:AllocateEipAddressPro

Last Updated:Apr 27, 2026

Call AllocateEipAddressPro to allocate a specified elastic IP address for use in custom network configurations.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the EIP is to be allocated.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

IpAddress

string

No

The IP address of the EIP to be allocated.

You can specify either IpAddress or InstanceId. If you do not specify either parameter, the system randomly allocates an EIP.

192.0.XX.XX

InstanceId

string

No

The ID of the EIP to be allocated.

You can specify either IpAddress or InstanceId. If you do not specify either parameter, the system randomly allocates an EIP.

eip-25877c70gddh****

Bandwidth

string

No

The peak bandwidth of the EIP. Unit: Mbps.

  • If InstanceChargeType is PostPaid (pay-as-you-go) and InternetChargeType is PayByBandwidth, Bandwidth can be from 1 to 500.

  • If InstanceChargeType is PostPaid (pay-as-you-go) and InternetChargeType is PayByTraffic, Bandwidth can be from 1 to 200.

  • If InstanceChargeType is PrePaid (subscription), Bandwidth can be from 1 to 1000.

Default value: 5.

5

Period

integer

No

The subscription period.

  • If PricingCycle is Month, Period can be from 1 to 9.

  • If PricingCycle is Year, Period can be from 1 to 3.

This parameter is required when InstanceChargeType is set to PrePaid.

If InstanceChargeType is set to PostPaid, this parameter is not required.

1

ISP

string

No

The line type. Valid values:

  • BGP (default): BGP (Multi-ISP) line. All regions support EIPs that use BGP (Multi-ISP) lines.

  • BGP_PRO: BGP (Multi-ISP) Pro line. This line type is available only in the China (Hong Kong), Singapore, 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 your account is on the allowlist for single-ISP bandwidth, you can also select one of the following values:
    • ChinaTelecom

    • ChinaUnicom

    • ChinaMobile

    • ChinaTelecom_L2

    • ChinaUnicom_L2

    • ChinaMobile_L2

  • For China (Hangzhou) Finance Cloud users, this parameter is required and must be set to BGP_FinanceCloud.

BGP

Netmode

string

No

The network type. The only valid value is public (default), which indicates the public network.

public

AutoPay

boolean

No

Specifies whether to enable automatic payment. Valid values:

  • false: Disables automatic payment. You must go to the Order Center to pay for the order.

  • true: Enables automatic payment. The payment is completed automatically.

This parameter is required only when InstanceChargeType is set to PrePaid.

true

PricingCycle

string

No

The billing cycle of the subscription EIP. Valid values:

  • Month (default): Billed monthly.

  • Year: Billed annually.

This parameter is required only when InstanceChargeType is set to PrePaid (subscription).

Month

InstanceChargeType

string

No

The billing method of the EIP. Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

If InstanceChargeType is set to PrePaid, InternetChargeType must be set to PayByBandwidth.

If InstanceChargeType is set to PostPaid, you can set InternetChargeType to PayByBandwidth or PayByTraffic.

PostPaid

InternetChargeType

string

No

The metering method of the EIP. Valid values:

  • PayByBandwidth (default): pay-by-bandwidth

  • PayByTraffic: pay-by-traffic

If InstanceChargeType is set to PrePaid, InternetChargeType must be set to PayByBandwidth.

If InstanceChargeType is set to PostPaid, you can set InternetChargeType to PayByBandwidth or PayByTraffic.

PayByBandwidth

ResourceGroupId

string

No

The ID of the resource group for the EIP.

rg-resourcegroup****

Tag

array<object>

No

The tags to add to the EIP.

object

No

Key

string

No

The tag key.

Value

string

No

The tag value.

ClientToken

string

No

A token used to ensure the idempotence of the request.

You must ensure that this token is unique across requests. The token can contain only ASCII characters.

Note

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

0c593ea1-3bea-11e9-b96b-88e9fe6****

SecurityProtectionTypes

array

No

The security protection level.

  • If you do not specify this parameter, DDoS Protection (Basic) is enabled by default.

  • Set the value to AntiDDoS_Enhanced to enable DDoS Protection (Enhanced).

string

No

The security protection level.

  • If you do not specify this parameter, DDoS Protection (Basic) is enabled by default.

  • Set the value to AntiDDoS_Enhanced to enable DDoS Protection (Enhanced).

PublicIpAddressPoolId

string

No

The ID of the IP address pool from which to allocate the EIP.

This feature is disabled by default. To use this feature, apply for the required permissions in Quota Center. For more information, see Increase quotas by using Quota Center.

pippool-2vc0kxcedhquybdsz****

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

4EC47282-1B74-4534-BD0E-403F3EE64CAF

OrderId

integer

The order ID. This parameter is returned when InstanceChargeType is set to PrePaid (subscription). If AutoPay is set to false, go to the Order Center to complete the payment.

20190000

ResourceGroupId

string

The ID of the resource group. This parameter is returned only when InstanceChargeType is set to PostPaid.

rg-resourcegroup****

EipAddress

string

The IP address of the EIP. This parameter is returned only when InstanceChargeType is set to PostPaid.

192.0.XX.XX

AllocationId

string

The ID of the Elastic IP Address (EIP).

eip-25877c70gddh****

Examples

Success response

JSON format

{
  "RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
  "OrderId": 20190000,
  "ResourceGroupId": "rg-resourcegroup****",
  "EipAddress": "192.0.XX.XX",
  "AllocationId": "eip-25877c70gddh****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 FrequentPurchase.EIP eip frequent purchase
400 COMMODITY_NO_EXIST commodity is not exist
400 QuotaExceeded.Eip Elastic IP address quota exceeded
400 InvalidParameter Specified value of "InternetChargeType" is not valid
400 InsufficientBalance Your account does not have enough balance.
400 ReserveIpFail Reserve eip failed.
400 InvalidRegion.NotSupport The specified region does not support.
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 SYSTEM.UNKNOWN.ERROR The Account failed to create order.
400 TokenVerfiy.Failed token verify failed.
400 OrderFailed The Account failed to create order.
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 Invalid.Reserve.Ip The reserve ip is invalid.
400 Ip.Allocated The reserve ip has been allocated. Reserved IP addresses are already specified.
400 Ip.Keeped The reserve ip been keeped in an hour.
400 OperationFailed.AllocateUnfamiliarIp The operation failed because only IP addresses used within the last seven days can be allocated. Only IP addresses used within the last seven days can be used to apply for EIP.
400 INVALID_INSTANCE_STATUS The instance status is invalid.
400 OperationFailed.InstanceNotExist Eip instanceId does not exist.
400 InvalidStatus.ValueNotSupported The specified status is not supported.
400 OperationFailed.RiskControl Risk 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.
400 OrderError.EIP The Account failed to create order. Failed to place the order.
400 ResourceNotEnough.PublicIpAddressPool The specified resource of PublicIpAddressPool is not enough.
400 Mismatch.IpAndPublicIpAddressPool The Ip and PublicIpAddressPool are mismatched.
400 ResourceNotFound.PublicIpAddressPool The specified resource of PublicIpAddressPool is not found.
400 ResourceNotFound.Ip The specified ip is not found. The specified IP could not be found.
400 OperationDenied.IpBelongToOtherUser The operation is not allowed because of ip belong to other user. Your application failed because the IP address belongs to another user.
400 IncorrectStatus.Ip The status of ip is incorrect. The status of the IP is incorrect.
400 OperationFailed.IpIsLocked The operation is failed because of ip is locked. Your application failed because the IP address is locked.
400 Mismatch.IpAndIsp The specified IP address does not match the ISP. The system failed to allocate the specified EIP because the ISP and IP address do not match.
400 IncorrectStatus.PublicIpAddressPool The status of PublicIpAddressPool is incorrect. EIPs are not allowed to be allocated because the address pool is in an unstable state.
400 IllegalParam.IpAddress The specified IpAddress (%s) is illegal. The IpAddress parameter is set to an invalid value.
400 OperationFailed.ResourceNotEnough The resources you have applied for are insufficient. The resources you have applied for are insufficient. If you still need to apply, please submit a work order for processing.
400 Mismatch.EipSecurityProtectionTypeAndPoolSecurityProtectionType The EipSecurityProtectionType and PoolSecurityProtectionType are mismatched. The EIP protection type does not match the address pool protection type.
400 IllegalParam.Isp The param of Isp [%s] is illegal. The error message returned because the Isp parameter is set to an invalid value. Specify a valid value and try again.
500 InternalError The request processing has failed due to some unknown error, exception or failure. An internal error occurred.
403 Forbidden User 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.
404 InvalidRegionId.NotFound Specified value of "RegionId" is not supported.
404 FUWU_BIZ_COMMODITY_VERIFY_FAIL ????????, ????????PD.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.