文档

AssociateEnsEipAddress - 将EIP绑定到云产品实例上

更新时间:

调用AssociateEnsEipAddress将弹性公网IP(EIP)绑定到同节点的云产品实例上。

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ens:AssociateEnsEipAddress
  • acs:ens::{#accountId}:*

请求参数

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

待绑定 EIP 的 ID。

eip-5sc1sgcrsrwgwdvx44hru3p63
InstanceIdstring

绑定 EIP 的云产品 ID。

说明 支持负载均衡(ELB)实例 ID。
lb-5saivuir6b1mupxjfbhmk1xkb
InstanceTypestring

EIP 实例的类型,取值:

  • Nat:NAT 网关。
  • SlbInstance:负载均衡(ELB)。
  • NetworkInterface:辅助弹性网卡。
  • NatSlbInstance:ELB 绑定多 EIP 时,需要选此值。
  • EnsInstance(默认值):ENS 实例。
SlbInstance
Standbyboolean

是否备用 EIP。取值:

  • true:备用。

  • false:非备用。

true

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

示例

正常返回示例

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

错误码

HTTP status code错误码错误信息描述
400RegionAccessDeniedCould not operate this region's resource-
400InstanceNotFoundThe input parameter instancdId that is not found.指定的InstanceId不存在。
400ens.interface.errorAn error occurred while call the API.-
400Invalid%sThe specified parameter %s is invalid.参数不正确
400Missing%sYou must specify the parameter %s.参数为必填
400IncorrectEipStatusThe current status of the resource does not support this operation.-
400InvalidAssociation.DuplicatedSpecified instance already is associated.-
400LoadBalancerNotFoundThe input parameter allocationId that is not found.-
400EipNotFoundThe input parameter allocationId that is not found.-
400IncorrectInstanceStatusCurrent instance status does not support this operation.-
400InvalidAssociation.AssociateEipFistAssociate EIP first.-
400InvalidAssociation.RegionNotSupportStandbyThe region of EIP does not support standby.-
400NatNotFoundThe input parameter allocationId that is not found.-
400InvalidAssociation.NetworkTypeNotSupportThe instance network type does not support binding to EIP.-
400EniNotFoundThe input parameter allocationId that is not found.-
400IncorrectEniStatusCurrent instance status does not support this operation.-
400InvalidParameter.EniServiceManaged The eni is managed by service.-
400InvalidAssociation.EniNotSupportStandbyEni does not support standby eip.-
400IncorrectEniTypeThe type of eni is invalid.-
400NoPermissionPermission denied.没有足够的权限,请联系云账号管理员授予您相应权限。
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

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

变更历史

变更时间变更内容概要操作
2024-01-23OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
2023-09-21OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
2023-07-18OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
入参OpenAPI 入参发生变更
    新增入参:Standby
2023-03-14OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
  • 本页导读 (1)
文档反馈