全部產品
Search
文件中心

Elastic IP Address:AssociateEipAddressBatch

更新時間:Jul 10, 2026

呼叫 AssociateEipAddressBatch 介面批量將彈性公網 IP(Elastic IP Address,簡稱 EIP)綁定到同地域的雲端產品執行個體上。

介面說明

  • AssociateEipAddressBatch 用於批量綁定 EIP 到雲端產品執行個體,僅支援批量綁定 EIP 到同地域的 NAT 閘道器執行個體或輔助彈性網卡執行個體。若要將 EIP 綁定到其他雲端產品執行個體,請參閱 AssociateEipAddress

  • AssociateEipAddressBatch 介面屬於非同步介面,即系統會先返回一個請求 ID,但 EIP 執行個體與雲端產品執行個體並未批量綁定完成,系統後台的綁定任務仍在進行。您可以呼叫 DescribeEipAddresses 查詢 EIP 執行個體的狀態:
    • 當 EIP 執行個體處於 Associating 狀態時,表示 EIP 執行個體正在綁定中,在該狀態下,您只能執行查詢操作,不能執行其他操作。

    • 當 EIP 執行個體處於 InUse 狀態時,表示 EIP 執行個體綁定完成。

  • AssociateEipAddressBatch 介面不支援同一個 EIP 執行個體並行綁定雲端產品執行個體。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

vpc:AssociateEipAddressBatch

update

*Address

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

Instance

acs:vpc:{#regionId}:{#accountId}:instance/{#InstanceId}

NatGateway

acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

要綁定雲端產品執行個體的 EIP 所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。

cn-hangzhou

BindedInstanceId

string

要綁定 EIP 的雲端產品執行個體 ID。

支援輸入 NAT 閘道器執行個體 ID、輔助彈性網卡執行個體 ID。

ngw-hp3akk9irtd69jad****

BindedInstanceType

string

要綁定 EIP 的執行個體類型,取值:

  • Nat:NAT 閘道器。

  • NetworkInterface:輔助彈性網卡。

Nat

Mode

string

綁定模式,僅取值為 MULTI_BINDED,表示多 EIP 網卡可見模式。

僅當 InstanceType 設定為 NetworkInterface 時,才需要設定此參數。

MULTI_BINDED

InstanceIds

array

需要與雲端產品執行個體綁定的 EIP 清單。

需至少輸入 1 個 EIP,最多支援輸入 50 個 EIP。

string

需要與雲端產品執行個體綁定的 EIP 執行個體 ID。

需至少輸入 1 個 EIP 執行個體的 ID,最多支援輸入 50 個 EIP 執行個體的 ID。

eip-2zeerraiwb7ujsxdc****

RegionId

string

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

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

說明

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

cn-hangzhou

ClientToken

string

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

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

說明

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

02fb3da4-130e-11e9-8e44-0016e04115b

返回參數

名稱

類型

描述

樣本值

object

返回參數清單。

RequestId

string

請求 ID。

54B48E3D-DF70-471B-AA93-08E683A1B45

樣本

正常返回樣本

JSON格式

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidAssociation.Duplicated Specified instance already is associated.
400 OperationDenied Specified instance is not in VPC.
400 InvalidParameter.Mismatch Specified elastic IP address and ECS instance are not in the same region.
400 IncorrectEipStatus Current elastic IP status does not support this operation
400 IncorrectInstanceStatus Current instance status does not support this operation.
400 InvalidInstanceType.ValueNotSupported The specified value of InstanceType is not supported.
400 IncorrectHaVipStatus HaVip can be operated by this action only when it's status is Available or InUse. 僅當 Havip 執行個體為 Available 或 InUse 時,才允許操作。
400 InvalidParameter The specified parameter is not valid.
400 Forbidden The eip instance owener error EIP 不屬於目前呼叫者,請您檢查該 EIP 是否可被您呼叫。
400 TaskConflict The eip operate too frequent, TaskConflict. 操作過於頻繁,請稍候再重試。
400 InvalidBindingStatus The eip binding status invalid.
400 BIND_INSTANCE_HAVE_PORTMAP_OR_BIND_EIP The instance may have portMap or already bind eip. ECS 執行個體已經存在連接埠轉送規則(DNAT),請刪除相應的連接埠轉送規則再進行操作。
400 EIP_CAN_NOT_ASSOCIATE_WITH_PUBLIC_IP instance already bind natpublicip,cannot bind eip.
400 BIND_INSTANCE_OWENER_ERROR Cannot operate the eip.
400 NATGATEWAY_FINANCIALLOCKED The NatGateway has expire, cannot do bind operation.
400 InvalidParameter.InstanceTypeNotSupport The specified instance type is not support.
400 QuotaExceeded.NumberOfTrafficEip The number of traffic eip on natgw exceed limitation.
400 QuotaExceeded.NumberOfEip Binded eip Quota exceed on this NatGw. 此 NAT 閘道上,綁定的 EIP 數量已經超出配額限制。
400 InvalidEipBandwidth.OutOfMaxValue The Eip Bandwidth is invalid.
400 Forbidden.EipCanNotBindGatgw Eip can not bind on natgw.
400 InvalidAction.Denied Action is denied due to unfinished Eip configuration modification. 由於未完成 EIP 設定修改,操作被拒絕。
400 InstanceType.NotSupport The instance type is invalid.
400 InvalidParams.NotFound instance not found
400 BindInstance.NotSupported bind instance type %s is not supported.
400 Forbidden.InstanceBandwidthNotZero Eip can not bind with instance when it's bandwidth is not zero.
400 INSTANCE_TYPE_NOT_SUPPORT The instance type is invalid.
400 ServerRegion.Invalid Eip bind remote server region invalid.
400 Eni.Attached The eni should be detached from ecs when associating with direct eip. 當 ENI 綁定直通 EIP 時,需要 ENI 與 ECS 解除綁定。
400 Invalid.DirectEip.BindType The direct eip can be only associated with eni.
400 Invalid.Function.NotSupported Multi-IP function is under test, the region or uid is not supported.
400 InvalidStatus.EniStatusNotSupport %s
400 InvalidParameter.EniInstanceId %s
400 %s %s
400 EipBatchBind.TypeNotSupport eip batch bind type not support
400 OperationFailed.RegionNotMatch The specified eip is not in this region
400 InvalidEIPStatus.BizDisabled The EIP has been locked. EIP 執行個體被鎖定。
400 Forbidden.FinancialLocked The ip business status is invalid. 當路由器介面欠費時,無法進行此操作。
400 OperationDenied.Unauthorized The operation is not allowed because the user is not in the whitelist. 此操作不被允許,使用者不在白名單中。
400 OperationDenied.UnsupportedEipBindMode The operation is not supported for the NAT gateway due to its EIP binding mode. 此 NAT 閘道器的 EIP 綁定類型不支援此操作。
400 OperationDenied.Ipv4GatewayExist The operation is not allowed because of Ipv4GatewayExist.
404 InvalidAllocationId.NotFound Specified allocation ID is not found.
404 InvalidInstanId.NotFound Specified instance does not exist.
404 Forbidden.RegionNotFound Specified instance is not found during access authentication. 目前 Region 不支援。
404 OperationDenied.VpcIpv4GatewayEnabled The operation is not allowed because of the VPC of the NAT gateway has opened IPv4 Gateway. 不允許操作,因為 NAT 閘道器的 VPC 已經啟用 IPv4 閘道器。

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

變更歷史

更多資訊,參考變更詳情