全部產品
Search
文件中心

Elastic IP Address:AllocateEipAddressPro

更新時間:Jul 10, 2026

呼叫 AllocateEipAddressPro 申請指定的 EIP,可用於特定的網路配置需求。

調試

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

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

vpc:AllocateEipAddressPro

create

*Address

acs:vpc:{#regionId}:{#accountId}:eip/*

請求參數

名稱

類型

必填

描述

樣本值

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

預設值:5 Mbps。

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 QuotaExceeded.Eip Elastic IP address quota exceeded
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 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 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 失敗,ISP 和 IP 參數不匹配。
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. EIP 不屬於目前呼叫者,請您檢查該 EIP 是否可被您呼叫。

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

變更歷史

更多資訊,參考變更詳情