调用 AssociateEipAddress 接口,将公网IP与云资源绑定。
单个账号单个地域下每日最多调用本接口的次数为可申请公网IP数量的3倍。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AssociateEipAddress | 要执行的操作,取值: AssociateEipAddress。 |
Version | String | 是 | 2020-04-01 | API的版本信息,当前版本为2020-04-01。 |
AllocationId | String | 是 | eip-2zeewb7ujxscd**** | 公网IP的ID。 |
DirectMode | Boolean | 否 | false | 绑定公网IP时是否启用直通模式。取值如下:
说明 EIP直通功能正在邀测中,如需试用,请联系客户经理申请。 |
InstanceType | String | 是 | EcsInstance | 待绑云资源的类型。取值如下:
说明 高可用虚拟IP正在邀测中,如需试用,请联系客户经理。 |
InstanceId | String | 是 | i-2zebbhyczzaweeval**** | 待绑定云资源的ID。根据InstanceType 传入的参数,传入对应类型云资源的ID。 |
PrivateIpAddress | String | 否 | 192.XX.XX.4 | 要绑定公网IP的实例的私网IP地址。
说明 在公网IP绑定高可用虚拟IP、NAT网关、负载均衡CLB时,不支持传入 |
ClientToken | String | 否 | 123e4567-e89b-12d3-a456-42665544**** | 保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。取值:
|
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 2021062415303301022514515207C4**** | 请求ID。 |
GET /?Action=AssociateEipAddress&Version=2020-04-01&AllocationId=eip-2zeewb7ujxscd****&InstanceType=EcsInstance&InstanceId=i-2zebbhyczzaweeval**** HTTP/1.1 Host: open.volcengineapi.com Service: vpc Region: cn-beijing
{ "ResponseMetadata": { "RequestId": "2021062415303301022514515207C4****", "Action": "AssociateEipAddress", "Version": "2020-04-01", "Service": "vpc", "Region": "cn-beijing" }, "Result":{ "RequestId": "2021062415303301022514515207C4****" } }
公共错误码,请参见 公共错误码 。
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IdempotentParameterMismatch | Arguments on this idempotent request are inconsistent with arguments used in previous request(s). | 此幂等请求的参数与前一个请求中使用的参数不一致。 |
400 | InvalidClb.InUse | The specified CLB instance has already been associated with an anycast elastic ip address. | 指定的CLB实例已经关联任播公网IP。 |
400 | InvalidClb.InUse | The specified CLB has already been associated with an elastic ip address. | 指定的CLB已经绑定公网IP。 |
400 | InvalidClb.InvalidStatus | The specified CLB is not in the correct status for the request. Current CLB has been frozen. | 指定的CLB所处状态无法响应该请求。当前CLB被冻结。 |
400 | InvalidEcs.InUse | The specified ECS instance has already been associated with an anycast elastic ip address. | 指定的ECS实例已经关联任播公网IP。 |
400 | InvalidEip.InstanceMismatch | The specified instance private ip does not support eip association. | 指定实例的私网IP不支持绑定公网IP。 |
400 | InvalidEip.InvalidStatus | The specified elastic ip address is not in the correct status for the request. | 指定的公网IP所处状态无法响应该请求。 |
400 | InvalidEip.InvalidStatus | The specified elastic ip is not in the correct status for the request. The specified elastic ip is in freeze. | 指定的公网IP或私有网络所处的状态无法响应该请求。当前公网IP被冻结。 |
400 | InvalidEni.InUse | The specified elastic network interface has already been associated with an elastic ip address. | 指定网卡已经绑定公网IP。 |
400 | InvalidEni.InvalidType | The type of specified elastic network interface is illegal for the request. | 指定类型的弹性网卡无法响应该请求。 |
400 | InvalidHaVip.InUse | The specified HaVip has already been associated with an elastic ip address. | 指定的高可用虚拟IP已经绑定公网IP。 |
400 | InvalidInstance.InUse | The specified ECS has already been associated with an elastic ip address. | 指定的ECS已经绑定公网IP。 |
400 | InvalidInstance.InvalidStatus | The specified ECS is not in the correct status for the request. Current ECS has been frozen. | 指定的ECS所处状态无法响应该请求。当前ECS被冻结。 |
400 | InvalidIpAddress.InUse | The specified IP address of elastic network interface has already been associated with an anycast elastic ip address. | 指定弹性网卡的IP地址已经关联任播公网IP。 |
400 | InvalidNatGateway.InvalidStatus | The operation is not supported by the current nat gateway | 指定的NAT网关所处的状态无法响应该请求。 |
400 | InvalidNatGateway.UnSupportAction | The specified NAT gateway does not support this action. | 指定的NAT网关不支持当前操作。 |
400 | InvalidParameter.ClientTokenMalformed | The specified parameter ClientToken is malformed. | 指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。 |
400 | InvalidPrivateIp.InstanceMismatch | The specified private ip and the instance mismatch. | 指定的辅助IP和实例不匹配。 说明 更多信息请参见请求参数PrivateIpAddress的说明。 |
400 | InvalidPrivateIp.Malformed | The specified private ip is malformed. The specified private ip is not the primary ip of ECS. | 指定的私网IP不合法。指定的私网IP不是ECS的主私网IP。 |
400 | QuotaExceeded.Eip | The number of EIPs bound to the NAT gateway exceeded quota. | 已到达一个NAT网关可绑定公网IP的数量上限。 |
400 | QuotaExceeded.ExceedLimit | Interface call exceeds limit. | 接口调用次数超出限制。 |
403 | Forbidden | You are not authorized to perform operations on the specified elastic ip and ALB. | 无权限操作此EIP和ALB。 |
403 | Forbidden | You are not authorized to perform operations on the specified elastic network interface. The specified elastic network interface is a service-managed elastic network interface. | 无权限对指定弹性网卡进行操作。指定的弹性网卡为云产品托管的弹性网卡。 |
403 | Forbidden | You are not authorized to perform operations on the specified elastic ip and public CLB. | 无权限操作此EIP和公网CLB。 |
400 | InvalidDirectModeEip.InstanceMismatch | The specified instance type does not support direct mode EIP. | 指定的实例类型不支持EIP直通模式。 |
400 | InvalidDirectModeEip.InvalidBindInstanceType | Only elastic network interface bound to ECS support associating direct mode EIP. | 只有绑定了ECS的弹性网卡支持绑定直通EIP。 |
400 | InvalidInstance.IPv4Disabled | IPv4 has been disabled for the specified instance. | 指定实例已经禁用IPv4。 |
403 | Forbidden | You are not authorized to perform operations on ESI related resources. | 无权限操作弹性预约实例关联资源。 |
403 | Forbidden | You are not authorized to associate direct mode EIP with ECS. | 无权限绑定直通EIP到ECS上。 |
403 | Forbidden | You are not authorized to associate binded EIP on elastic network interface. | 无权限绑定直通EIP到弹性网卡上。 |
404 | InvalidEip.NotFound | The specified EIP does not exist. | 指定的公网IP不存在。 |
404 | InvalidEniId.NotFound | The specified elastic network interface does not exist. | 指定的弹性网卡不存在。 |
404 | InvalidInstance.NotFound | The specified instance does not exist. | 指定的实例不存在。 |
404 | InvalidInstanceType.NotFound | The specified instance type does not exist. | 指定的实例类型不存在。 |
412 | IdempotentProcessing | The request uses the same client token as a previous one that is still in process. | 幂等请求处理中。 |
412 | InvalidNatGateway.Expired | The specified NAT gateway has expired. | 指定的NAT网关已到期。 |