调用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代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:AssociateEipAddressBatch |
update |
*Address
Instance
NatGateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要绑定云产品实例的 EIP 所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| BindedInstanceId |
string |
是 |
要绑定 EIP 的云产品实例 ID。 支持输入 NAT 网关实例 ID、辅助弹性网卡实例 ID。 |
ngw-hp3akk9irtd69jad**** |
| BindedInstanceType |
string |
是 |
要绑定 EIP 的实例的类型,取值:
|
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**** |
|
| 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网关 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。