AllocateEipAddressPro - 申請指定的EIP

更新時間:
Copy as MD

調用AllocateEipAddressPro申請指定的EIP,可用於特定的網路設定需求。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

要指定申請的 EIP 所在的地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

cn-hangzhou

IpAddress

string

要指定申請的 EIP 的 IP 位址。

IpAddressInstanceId 參數僅需傳入一個,如果都不傳,系統會隨機申請 EIP。

192.0.XX.XX

InstanceId

string

要指定申請的 EIP 的執行個體 ID。

IpAddressInstanceId 參數僅需傳入一個,如果都不傳,系統會隨機申請 EIP。

eip-25877c70gddh****

Bandwidth

string

要指定申請的 EIP 的頻寬峰值,單位:Mbps。

  • InstanceChargeType 取值為 PostPaid,且 InternetChargeType 取值為 PayByBandwidth 時,Bandwidth 取值範圍為 1~500

  • InstanceChargeType 取值為 PostPaid,且 InternetChargeType 取值為 PayByTraffic 時,Bandwidth 取值範圍為 1~200

  • InstanceChargeType 取值為 PrePaid 時,Bandwidth 取值範圍為 1~1000

預設值:5Mbps。

5

Period

integer

購買時間長度。

  • PricingCycle 取值 Month 時,Period 取值範圍為1~9

  • PricingCycle 取值 Year 時,Period 取值範圍為1~3

如果 InstanceChargeType 參數的值為 PrePaid 時,該參數必選。

如果 InstanceChargeType 參數的值為 PostPaid 時,該參數不填。

1

ISP

string

線路類型。取值:

  • 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

Netmode

string

網路類型,僅取值為 public(預設值),表示公網。

public

AutoPay

boolean

是否自動付費,取值:

  • false:不開啟自動付費,產生訂單後需要到訂單中心完成支付。

  • true:開啟自動付費,自動支付訂單。

InstanceChargeType 參數的值為 PrePaid 時,該參數必選;當 InstanceChargeType 參數的值為 PostPaid 時,該參數可不填。

true

PricingCycle

string

訂用帳戶的計費周期,取值:

  • Month(預設值):月付型。

  • Year:按年付費。

InstanceChargeType 參數的值為 PrePaid 時,該參數必選;當 InstanceChargeType 參數的值為 PostPaid 時,該參數可不填。

Month

InstanceChargeType

string

要指定申請的 EIP 的計費方式,取值:

  • PrePaid:訂用帳戶。

  • PostPaid(預設值):隨用隨付。

InstanceChargeType 取值為 PrePaid 時,InternetChargeType 必須取值 PayByBandwidth

InstanceChargeType 取值為 PostPaid 時,InternetChargeType 可取值 PayByBandwidthPayByTraffic

PostPaid

InternetChargeType

string

要指定申請的 EIP 的計量方式,取值:

  • PayByBandwidth(預設值):按頻寬計費。

  • PayByTraffic:按流量計費。

InstanceChargeType 取值為 PrePaid 時,InternetChargeType 必須取值 PayByBandwidth

InstanceChargeType 取值為 PostPaid 時,InternetChargeType 可取值 PayByBandwidthPayByTraffic

PayByBandwidth

ResourceGroupId

string

要指定申請的 EIP 所屬的資源群組 ID。

rg-resourcegroup****

Tag

array<object>

object

Key

string

Value

string

ClientToken

string

用戶端 Token,用於保證請求的等冪性。

從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。

說明

若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。

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

SecurityProtectionTypes

array

安全防護層級。

  • 配置為空白時,預設為 DDoS 防護(基礎版)。

  • 配置為AntiDDoS_Enhanced時,表示 DDoS 防護(增強版)。

string

安全防護層級。

  • 配置為空白時,預設為 DDoS 防護(基礎版)。

  • 配置為AntiDDoS_Enhanced時,表示 DDoS 防護(增強版)。

PublicIpAddressPoolId

string

IP 位址集區 ID。

EIP 將從該 IP 位址集區中分配。

IP 位址集區功能預設不開放。如需使用,請在配額中心申請 IP 位址集區功能權益配額。具體操作,請參見通過配額中心提升配額

pippool-2vc0kxcedhquybdsz****

返回參數

名稱

類型

描述

樣本值

object

返回資訊列表。

RequestId

string

請求 ID。

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

OrderId

integer

訂單 ID。 當 InstanceChargeType(要指定申請的 EIP 的計費方式)取值為 PrePaid(訂用帳戶)時,返回該參數。如果 AutoPay 取值為 false,即未開啟自動支付賬單時,請前往訂單中心完成支付。

20190000

ResourceGroupId

string

資源群組 ID。僅 InstanceChargeType 取值為 PostPaid 時返回。

rg-resourcegroup****

EipAddress

string

您指定申請的 EIP 被分配到的 IP 位址。僅 InstanceChargeType 取值為 PostPaid 時返回。

192.0.XX.XX

AllocationId

string

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

錯誤碼

錯誤資訊

描述

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. 資源群組ID不存在。
400 Invalid.Reserve.Ip The reserve ip is invalid.
400 Ip.Allocated The reserve ip has been allocated. 已指派保留ip。
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. 指定EIP申請只允許申請7天內使用過的IP
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. 我們檢測到您的付款條件存在安全風險。請通過電子郵件或控制台訊息中的連結繼續驗證,並在驗證後重新提交訂單。
400 OrderError.EIP The Account failed to create 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. 找不到指定的IP。
400 OperationDenied.IpBelongToOtherUser The operation is not allowed because of ip belong to other user. 申請失敗,該IP歸屬其他使用者
400 IncorrectStatus.Ip The status of ip is incorrect. IP的狀態不正確。
400 OperationFailed.IpIsLocked The operation is failed because of ip is locked. 申請失敗,IP已經被鎖定
400 Mismatch.IpAndIsp The specified IP address does not match the ISP. 申請指定IP失敗,ISPIP參數不匹配.
400 IncorrectStatus.PublicIpAddressPool The status of PublicIpAddressPool is incorrect. 位址集區執行個體未處於穩態,不允許分配EIP。
400 IllegalParam.IpAddress The specified IpAddress (%s) is illegal. IpAddress參數不合法
400 OperationFailed.ResourceNotEnough The resources you have applied for are insufficient. 您申請的資源不足,如仍需申請,請提工單處理
400 Mismatch.EipSecurityProtectionTypeAndPoolSecurityProtectionType The EipSecurityProtectionType and PoolSecurityProtectionType are mismatched. EIP安全防護類型與位址集區安全防護類型不符。
400 IllegalParam.Isp The param of Isp [%s] is illegal. 參數 Isp 不合法,請根據請求參數規定重新輸入。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 內部錯誤
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情