AllocateEipAddress_专有网络_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

请确保在使用本接口前,您已充分了解 EIP 的收费方式和价格。更多信息,请参见计费概述

调用本接口后将在指定的地域内随机获取一个状态为 Available 的弹性公网 IP。弹性公网 IP 在传输层目前只支持解析 ICMP、TCP 和 UDP 协议内容,不支持解析 IGMP 和 SCTP 等协议内容。

流控信息

请求速率为120/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
vpc:AllocateEipAddress
Create
Address
acs:vpc:{#regionId}:{#accountId}:eip/*

请求参数

字段名称字段详情
RegionIdstring

弹性公网 IP 所在的地域 ID。展开详情

示例值:cn-hangzhou枚举值:cn-beijing参考取值来源:
    DescribeRegions
Bandwidthstring

EIP 的带宽峰值。单位:Mbps。展开详情

示例值:5参考取值来源:
    CreateCommonBandwidthPackage
    AllocateIpv6InternetBandwidth
    DescribeCommonBandwidthPackages
Periodinteger<int32>

购买时长。展开详情

示例值:1
ISPstring

线路类型。取值:展开详情

示例值:BGP
ActivityIdinteger<int64>

特殊活动 ID,无需配置此参数。

注意 该字段类型为 Long,在序列化/反序列化的过程中可能导致精度丢失,请注意数值不得大于 9007199254740991。
示例值:123456
Netmodestring

网络类型,仅取值为 public(默认值),表示公网。

示例值:public
AutoPayboolean

是否自动付费,取值:展开详情

示例值:false
PricingCyclestring

包年包月的计费周期,取值:展开详情

示例值:Month
InstanceChargeTypestring

EIP 的计费方式,取值:展开详情

示例值:PostPaid
InternetChargeTypestring

EIP 的计量方式,取值:展开详情

示例值:PayByTraffic
ResourceGroupIdstring

资源组 ID。

示例值:rg-acfmxazffggds****
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:0c593ea1-3bea-11e9-b96b-88e9fe637760
Namestring

EIP 实例的名称。展开详情

示例值:EIP1
Descriptionstring

EIP 实例的描述。展开详情

示例值:test
SecurityProtectionTypesarray<string>

安全防护级别。展开详情

示例值:AntiDDoS_Enhanced子级条数 <= 10
PublicIpAddressPoolIdstring

IP 地址池 ID。展开详情

示例值:pippool-2vc0kxcedhquybdsz****参考取值来源:
    ListPublicIpAddressPools
    CreatePublicIpAddressPool
    AddPublicIpAddressPoolCidrBlock
    TransformEipSegmentToPublicIpAddressPool
    DescribeEipAddresses
Zonestring

EIP 的可用区。展开详情

示例值:ap-southeast-1-lzdvn-cb参考取值来源:
    DescribeZones
IpAddressstring

要指定申请的 EIP 的 IP 地址。展开详情

示例值:192.0.XX.XX参考取值来源:
    DescribePublicIpAddress
    ListPublicIpAddressPools
    CreatePublicIpAddressPool
    AddPublicIpAddressPoolCidrBlock
InstanceIdstring

要指定申请的 EIP 的实例 ID。展开详情

示例值:eip-25877c70gddh****参考取值来源:
    DescribeEipAddresses
Tagarray<object>
子级条数 <= 21

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:4EC47282-1B74-4534-BD0E-403F3EE64CAF
OrderIdinteger<int64>

订单 ID。当 InstanceChargeType(EIP 的计费方式)取值为 PrePaid(包年包月)时,返回该参数。如果 AutoPay(自动付费)未打开,即未开启自动支付账单时,请前往订单中心完成支付。

注意 请注意,该值为 Long 类型,在某些语言中可能存在精度丢失的风险,请小心使用。
示例值:10
ResourceGroupIdstring

资源组 ID。仅 InstanceChargeType 取值为 PostPaid 时返回。

示例值:rg-acfmxazfdgdg****
EipAddressstring

分配的 EIP。仅 InstanceChargeType 取值为 PostPaid 时返回。

示例值:192.0.XX.XX
AllocationIdstring

EIP 实例的 ID。

示例值:eip-25877c70gddh****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
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
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.诊断
400
PAYFOR.CREDIT_PAY_INSUFFICIENT_BALANCE
Your account does not have enough balance.诊断
400
SYSTEM.SALE_VALIDATE_UNEXPECTED_ERROR
You have arrears and do not meet the purchase conditions.诊断
400
Trade_Sync_Create_Sub_ERROR
SyncOrderToSub error.诊断
400
InvalidComponent.EipBandwidthMax
The eip_bandwidth_max component is invalid.诊断
400
OperationFailed.RiskControl
Risk control check failed.诊断
400
OperationFailed.SaleValidate
Validate sale condition with subArticle failed.诊断
400
IllegalParam.OrderParamComponent
Product order param has invalid component.诊断
400
OperationFailed.SaleExpression
Get the sales expression exception attached to the item.诊断
400
OperationFailed.CompleteUserInfo
Complete user info failed.诊断
400
OperationFailed.QueryPrice
Query price failed when create order.诊断
400
OperationFailed.InsufficientEIP
Eip resource is not enough.诊断
400
OperationFailed.InvokeInnerApi
Failed to invoke inner api.诊断
400
OperationFailed.AccountMoneyInvalid
Account money is invalid.诊断
400
OperationFailed.QueryCredtiInfo
Failed to query credit info.诊断
400
FrequentPurchase.EIP
eip frequent purchase诊断
400
OperationFailed.QueryUserLabel
Failed to query user label info.诊断
400
PAY.INSUFFICIENT_BALANCE
Your account does not have enough balance.诊断
400
PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGAL
User withhoding argeement is illegal.诊断
400
OrderError.EIP
FThe Account failed to create order.诊断
400
IellgalParameter.OwnerAccount
The specified parameter OwnerAccount is not valid.诊断
400
ResourceNotFound.PublicIpAddressPool
The specified resource of PublicIpAddressPool is not found.诊断
400
ResourceNotEnough.PublicIpAddressPool
The specified resource of PublicIpAddressPool is not enough.诊断
400
Mismatch.IpAndPublicIpAddressPool
The Ip and PublicIpAddressPool are mismatched.诊断
400
CreditPayInsufficientBalance
The balance is insufficient, please contact your channel partner to increase the balance诊断
400
OperationDenied.NotOpenDdosOriginProtectService
The operation is not allowed because of you do not open Ddos Origin Protection Service诊断
400
IncorrectStatus.PublicIpAddressPool
The status of PublicIpAddressPool is incorrect.诊断
400
IllegalParam.Isp
The param of %s is illegal.诊断
400
AccountMoneyValidateError
The available amount of the account is insufficient.诊断
400
OrderFailed.ConcurrentOperate
Failed to create the order due to concurrent operations.诊断
400
OperationFailed.BasicInfoUncompleted
Your information is incomplete. Complete your information before the operation.诊断
400
OperationFailed.QuotaNotEnough
Your quota is insufficient. Please contact your channel partner to increase your quota诊断
400
ExclusiveParam.ZoneAndPublicIpAddressPoolId
The Zone and PublicIpAddressPoolId parameters are mutually exclusive.诊断
400
IllegalParam.Zone
The specified zone is invalid.诊断
400
OperationFailed.AllocateUnfamiliarIp
The operation failed because only IP addresses used within the last seven days can be allocated.诊断
400
Ip.Allocated
The reserve ip has been allocated.诊断
400
IncorrectStatus.Ip
The status of ip is incorrect.诊断
400
UnsupportedFeature.AllocateEipAddressWithZone
The feature of AllocateEipAddressWithZone is not supported.诊断
400
ResourceNotFound.Ip
The specified ip is not found.诊断
400
OperationFailed.CreditPayInsufficientBalance
Your account does not have enough balance.诊断
400
OperationFailed.ResourceNotEnough
The resources you have applied for are insufficient.诊断
400
IllegalParam.Bandwidth
The param of bandwidth is illegal.诊断
400
OperationFailed.IpIsLocked
The operation is failed because of ip is locked.诊断
400
Mismatch.EipSecurityProtectionTypeAndPoolSecurityProtectionType
The EipSecurityProtectionType and PoolSecurityProtectionType are mismatched.诊断
400
IllegalParam.SecurityProtectionTypes
The param of securityProtectionTypes is illegal.诊断
400
IllegalParam.ServiceLocation
The param of serviceLocation is illegal.诊断
400
UnsupportedFeature.Isp
The feature of Isp is not supported.诊断
400
ExclusiveParam.ZoneAndIpAddress
The specified param Zone and IpAddress or InstanceId are mutually exclusive.诊断
400
InvalidDescription.Malformed
The Description is illeagl.诊断
400
InvalidName.Malformed
The attribute name is illegal.诊断
400
OperationFailed.UpgradeCdtServiceFirst
The operation is failed because of cdt is not upgraded.诊断
403
Forbidden
User not authorized to operate on the specified resource.诊断
404
InvalidRegionId.NotFound
Specified value of "RegionId" is not supported.诊断
404
FUWU_BIZ_COMMODITY_VERIFY_FAIL
????????, ????????PD.诊断
409
OperationConflict
Request was denied due to conflict with a previous request.诊断
500
OrderError.EIP
The Account failed to create order.诊断
500
InternalError
The request processing has failed due to some unknown error, exception or failure.诊断
500
OperationFailed.SystemBusy
Operation failed because system is busy.诊断

变更历史

变更时间变更内容概要操作
2025-04-29
变更错误码400
2025-03-26
新增请求参数Tag
2024-07-16
变更错误码400
2024-05-17
变更错误码400
2024-03-14
变更错误码400
2024-03-14
变更错误码400
2024-02-02
变更错误码400
2024-01-22
变更错误码400
2023-12-13
变更错误码400

相关示例

申请eip-->绑定eni-->查询EIP的网关和掩码信息-->解绑eni
2021-12-16
申请eip-->释放eip-->指定ip申请回刚释放的ip
2021-12-16
创建EIP --> 开启删除保护
2021-12-17
创建带宽-->修改带宽包属性-->查询带宽包信息-->修改带宽-->加入eip(单个和批量)-->修改eip二级限速-->取消eip二级限速-->eip移出带宽包-->删除带宽包
2021-12-21