辅助 IP 接口

创建辅助IP

所属服务

nvm

Action

AssignSecondaryPrivateIpAddress

Version

2017-12-14

Method

GET

描述

从网卡上分配一个辅助私有IP地址

请求参数

参数名称说明参数类型是否必填备注
NetworkInterfaceId网卡ID,可以通过接口DescribeInstance获取string
SecondaryPrivateIpAddress指定分配的私有ip地址,不传则自动分配string
ActionAssignSecondaryPrivateIpAddressstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求Idstring

状态码

错误码(Code)错误提示(Message)http status code说明
RequestFailedfail400请求失败(一般为底层向底层请求失败)
NoSuchPortno such port404无效网卡信息
StatusConflictinstance status conflict with the operation409云服务器状态与当前操作冲突(主网卡,实例状态必须为active/shutoff)
SecondaryPrivateIpQuotaLimitsecondary private ip over quota400已到可绑定限额(目前一个网卡上最多分配1个辅助IP)
InvalidParaminvalid param400请求参数错误(一般参数为空)

请求示例

curl -X GET -H "X-Product-Id:54d4e01051e642c386e40d942bcedf0b" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-163-AcceptLanguage:zh" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=AssignSecondaryPrivateIpAddress&NetworkInterfaceId=a52523ab-dbc1-4b1d-922a-9e8668183852&SecondaryPrivateIpAddress=172.16.55.4'

返回示例

{"RequestId":"TEST-REQUEST-ID"}

删除辅助IP

所属服务

nvm

Action

UnassignSecondaryPrivateIpAddress

Version

2017-12-14

Method

GET

描述

从网卡上退还一个辅助私有ip地址

请求参数

参数名称说明参数类型是否必填备注
NetworkInterfaceId网卡ID,可以通过接口DescribeInstance获取string
SecondaryPrivateIpAddress指定分配的私有ip地址string
ActionUnassignSecondaryPrivateIpAddressstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求Idstring

状态码

错误码(Code)错误提示(Message)http status code说明
RequestFailedfail400请求失败(一般为向底层请求失败)
NoSuchSecondaryPrivateIpno such secondary private ip404无效辅助私有ip信息
ClearFloatingIpFailclear floating ip failed400清理Eip失败
StatusConflictinstance status conflict with the operation409云服务器状态与当前操作冲突(主网卡,实例状态必须是active/shutoff)
InvalidParaminvalid param400请求参数错误(参数格式不对,一般参数为空)

请求示例

curl -X GET -H "X-Product-Id:54d4e01051e642c386e40d942bcedf0b" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-163-AcceptLanguage:zh" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=UnassignSecondaryPrivateIpAddress&NetworkInterfaceId=a52523ab-dbc1-4b1d-922a-9e8668183852&SecondaryPrivateIpAddress=172.16.55.3'

返回示例

{"RequestId":"TEST-REQUEST-ID"}

迁移辅助 IP

所属服务

nvm

Action

MoveSecondaryPrivateIpAddress

Version

2017-12-14

请求url

/nvm?Action=MoveSecondaryPrivateIpAddress&Version=2017-12-14&PrivateIpAddress=&OldNetworkInterfaceId=&NewNetworkInterfaceId=

Method

GET

描述

暂无描述

请求参数

query

参数名称说明参数类型是否必填备注
PrivateIpAddress私有网ip(主ip不能迁移,只能迁移辅助ip)string
OldNetworkInterfaceId原网卡ID,可以通过接口DescribeInstance获取string原云服务器实例必须为active/shutoff状态
NewNetworkInterfaceId迁移的新网卡ID(两网卡必须在同一VPC子网内,否则无法迁移),可以通过接口DescribeInstance获取string目的云服务器实例必须为active/shutoff状态
ActionMoveSecondaryPrivateIpAddressstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求idstring

状态码

错误码(Code)错误提示(Message)http status code说明
NoSuchSecondaryPrivateIpno such secondary private ip404无效辅助私有ip信息
NoSuchInstanceno such instance of source network interface404源网卡所在主机不存在
SourceStatusConflictsource instance status conflict with the operation409当前云服务器状态与当前操作冲突
SecondaryPrivateIpQuotaLimitsecondary private ip over quota400已到网卡可绑定限额
NoSuchPortno such port404无效网卡信息
InvalidDestinationNetworkInterfaceinvalid destination primary private ip to source secondary private ip400目的网卡主ip与待迁移辅助ip子网不符
NoSuchInstanceno such instance of destination network interface404目的网卡所在主机不存在
DestinationStatusConflictdestination instance status conflict with the operation409目的云服务器状态与当前操作冲突
ServiceBusyservice busy please retry later409请稍后重试
RequestFailedfail400请求失败

请求示例

curl -X GET -H "X-Product-Id:4575f0f1063b484982bad09ddc5736c6" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-163-AcceptLanguage:zh" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=MoveSecondaryPrivateIp&PrivateIpAddress=172.16.1.208&OldNetworkInterfaceId=c53e7c3e-e8cc-490a-a8e9-d3350d75c051&NewNetworkInterfaceId=d52f50df-683d-4dea-8651-cfcc722e73bf'

返回示例

{"RequestId":"TEST-REQUEST-ID"}