首页 专有网络 VPC 开发参考 API参考 API目录 弹性公网IP AllocateEipAddressPro - 申请指定的EIP

AllocateEipAddressPro - 申请指定的EIP

更新时间: 2023-12-02 17:45:27

调用AllocateEipAddressPro申请指定的EIP,可用于特定的网络配置需求。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

要指定申请的EIP所在的地域ID。

您可以通过调用DescribeRegions接口获取地域ID。

cn-hangzhou
IpAddressstring

要指定申请的EIP的IP地址。

IpAddressInstanceId参数仅需传入一个,如果都不传,系统会随机申请EIP。

192.0.XX.XX
InstanceIdstring

要指定申请的EIP的实例ID。

IpAddressInstanceId参数仅需传入一个,如果都不传,系统会随机申请EIP。

eip-25877c70gddh****
Bandwidthstring

要指定申请的EIP的带宽峰值,单位:Mbps。

  • InstanceChargeType取值为PostPaid,且InternetChargeType取值为PayByBandwidth时,Bandwidth取值范围为1~500

  • InstanceChargeType取值为PostPaid,且InternetChargeType取值为PayByTraffic时,Bandwidth取值范围为1~200

  • InstanceChargeType取值为PrePaid时,Bandwidth取值范围为1~1000

默认值:5 Mbps。

5
Periodinteger

购买时长。

  • PricingCycle取值Month时,Period取值范围为1~9

  • PricingCycle取值Year时,Period取值范围为1~3

如果InstanceChargeType参数的值为PrePaid时,该参数必选。

如果InstanceChargeType参数的值为PostPaid时,该参数不填。

1
ISPstring

线路类型。取值:

  • BGP(默认值):BGP(多线)线路。目前全部地域都支持BGP(多线)线路EIP。
  • BGP_PRO:BGP(多线)_精品线路。目前仅中国香港、新加坡、马来西亚(吉隆坡)、菲律宾(马尼拉)、印度尼西亚(雅加达)和泰国(曼谷)地域支持BGP(多线)_精品线路EIP。

关于BGP(多线)线路和BGP(多线)_精品线路的更多信息,请参见EIP线路类型

  • 如果您是单线带宽的白名单用户,您还可以选择以下类型:
    • ChinaTelecom:中国电信
    • ChinaUnicom:中国联通
    • ChinaMobile:中国移动
    • ChinaTelecom_L2:中国电信L2
    • ChinaUnicom_L2:中国联通L2
    • ChinaMobile_L2:中国移动L2
  • 如果您是杭州金融云用户,该字段必填,取值:BGP_FinanceCloud
BGP
Netmodestring

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

public
AutoPayboolean

是否自动付费,取值:

  • false:不开启自动付费,生成订单后需要到订单中心完成支付。

  • true:开启自动付费,自动支付订单。

InstanceChargeType参数的值为PrePaid时,该参数必选;当InstanceChargeType参数的值为PostPaid时,该参数可不填。

true
PricingCyclestring

包年包月的计费周期,取值:

  • Month(默认值):按月付费。

  • Year:按年付费。

InstanceChargeType参数的值为PrePaid时,该参数必选;当InstanceChargeType参数的值为PostPaid时,该参数可不填。

Month
InstanceChargeTypestring

要指定申请的EIP的计费方式,取值:

  • PrePaid:包年包月。

  • PostPaid(默认值):按量计费。

InstanceChargeType取值为PrePaid时,InternetChargeType必须取值PayByBandwidth

InstanceChargeType取值为PostPaid时,InternetChargeType可取值PayByBandwidthPayByTraffic

PostPaid
InternetChargeTypestring

要指定申请的EIP的计量方式,取值:

  • PayByBandwidth(默认值):按带宽计费。

  • PayByTraffic:按流量计费。

InstanceChargeType取值为PrePaid时,InternetChargeType必须取值PayByBandwidth

InstanceChargeType取值为PostPaid时,InternetChargeType可取值PayByBandwidthPayByTraffic

PayByBandwidth
ResourceGroupIdstring

要指定申请的EIP所属的资源组ID。

rg-resourcegroup****
ClientTokenstring

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

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。

说明 若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId不一样。
0c593ea1-3bea-11e9-b96b-88e9fe6****
SecurityProtectionTypesarray

安全防护级别。

  • 配置为空时,默认为DDoS防护(基础版)。

  • 配置为AntiDDoS_Enhanced时,表示DDoS防护(增强版)。

您最多可以为10个EIP设置安全防护级别。

string

安全防护级别。

  • 配置为空时,默认为DDoS防护(基础版)。

  • 配置为AntiDDoS_Enhanced时,表示DDoS防护(增强版)。

您最多可以为10个EIP设置安全防护级别。

AntiDDoS_Enhanced
PublicIpAddressPoolIdstring

IP地址池ID。

EIP将从该IP地址池中分配。

IP地址池功能默认不开放。如需使用,请在配额中心申请IP地址池功能权益配额。具体操作,请参见通过配额中心提升配额

pippool-2vc0kxcedhquybdsz****

返回参数

名称类型描述示例值
object

返回信息列表。

RequestIdstring

请求ID。

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

订单号。仅InstanceChargeType取值为PrePaid时返回。

20190000
ResourceGroupIdstring

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

rg-resourcegroup****
EipAddressstring

您指定申请的EIP被分配到的IP地址。仅InstanceChargeType取值为PostPaid时返回。

192.0.XX.XX
AllocationIdstring

EIP的ID。

eip-25877c70gddh****

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
400FrequentPurchase.EIPeip frequent purchase-
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.该带宽不合法。
400InsufficientBalanceYour account does not have enough balance.账户余额不足,请先充值再操作。
400QuotaExceeded.EipElastic IP address quota exceeded.弹性公网IP的个数超过额度限制,如果您有更多额度的需求,建议您考虑使用NAT网关。
400ReserveIpFailReserve eip failed.EIP预留失败。
400InvalidRegion.NotSupportThe specified region does not support.该 RegionId 不支持此操作。
400InvalidBandwidth.MalformedThe specified Bandwidth is invalid.-
400INSTANCE_TYPE_NOT_SUPPORTThe instance type is invalid.-
400QueryParameter.Illegalquery parameter illegal-
400SYSTEM.UNKNOWN.ERRORThe Account failed to create order.-
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.资源组ID不存在。
400Invalid.Reserve.IpThe reserve ip is invalid.-
400Ip.AllocatedThe reserve ip has been allocated.已分配保留ip。
400Ip.KeepedThe reserve ip been keeped in an hour.-
400OperationFailed.AllocateUnfamiliarIpThe operation failed because only IP addresses used within the last seven days can be allocated.指定EIP申请只允许申请7天内使用过的IP
400INVALID_INSTANCE_STATUSThe instance status is invalid.-
400OperationFailed.InstanceNotExistEip instanceId does not exist.-
400InvalidStatus.ValueNotSupportedThe specified status is not supported.-
400OperationFailed.RiskControlRisk control check failed.我们检测到您的付款方式存在安全风险。请通过电子邮件或控制台消息中的链接继续验证,并在验证后重新提交订单。
400OrderError.EIPThe Account failed to create order.下单失败
400ResourceNotEnough.PublicIpAddressPoolThe specified resource of PublicIpAddressPool is not enough.-
400Mismatch.IpAndPublicIpAddressPoolThe Ip and PublicIpAddressPool are mismatched.-
400ResourceNotFound.PublicIpAddressPoolThe specified resource of PublicIpAddressPool is not found.-
400ResourceNotFound.IpThe specified ip is not found.找不到指定的ip。
400OperationDenied.IpBelongToOtherUserThe operation is not allowed because of ip belong to other user.申请失败,该IP归属其他用户
400IncorrectStatus.IpThe status of ip is incorrect.ip的状态不正确。
400OperationFailed.IpIsLockedThe operation is failed because of ip is locked.申请失败,IP已经被锁定
400Mismatch.IpAndIspThe specified IP address does not match the ISP.申请指定IP失败,ISP和IP参数不匹配.
400IncorrectStatus.PublicIpAddressPoolThe status of PublicIpAddressPool is incorrect.地址池实例未处于稳态,不允许分配EIP。
400IllegalParam.IpAddressThe specified IpAddress (%s) is illegal.IpAddress参数不合法
400OperationFailed.ResourceNotEnoughThe resources you have applied for are insufficient.您申请的资源不足,如仍需申请,请提工单处理
403ForbiddenUser not authorized to operate on the specified resource.您没有权限操作指定资源,请申请权限后再操作。
404InvalidRegionId.NotFoundSpecified value of "RegionId" is not supported.指定的 RegionId 不存在,请您检查此产品在该地域是否可用。
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.指定的RegionId不存在。请检查该参数是否正确。
404FUWU_BIZ_COMMODITY_VERIFY_FAIL????????, ????????PD.-
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.内部错误

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-10-19OpenAPI 描述信息更新,OpenAPI 错误码发生变更看变更集
变更项变更内容
API 描述OpenAPI 描述信息更新
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:403
    删除错误码:404
    删除错误码:500
2023-07-06OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:403
    删除错误码:404
    删除错误码:500
2023-05-15OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 403 变更
    删除错误码:400
    删除错误码:404
    删除错误码:500
2022-12-02OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:403
    删除错误码:404
    删除错误码:500
阿里云首页 专有网络 VPC 相关技术圈