参数名称 | 类型 | 必填 | 描述 |
---|
Action | String | 是 | 公共参数,本接口取值:AttachNetworkInterface。 |
Version | String | 是 | 公共参数,本接口取值:2016-03-04。 |
InstanceId | String | 是 | 实例ID 示例值:98284100-f6d1-4bbf-886a-1b0765024738 |
NetworkInterfaceId | String | 否 | 弹性网卡ID(保留已经上线的参数,该参数与已经上线参数不可同时指定) 示例值:2f93aaba-6368-4cec-b50f-9f199138023f |
SubnetId | String | 否 | |
SecurityGroupId.N | String | 否 | 安全组id |
PrivateIpAddress | String | 否 | |
VpcIpv6 | String | 否 | 指定子网下的ipv6地址 |
MacAddress | String | 否 |
参数名称 | 类型 | 描述 |
---|
RequestId | String | 请求ID 示例值:35ebced8-26dc-4f4c-bb2a-f1884efb5dc0 |
Return | Boolean | 返回状态 示例值:true(成功)/false(失败) |
JSON格式
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码
错误码 | 错误信息 | Http状态码 | 描述 |
---|
NetworkInterfaceNotFound | The specified network interface is not exist | 400 | 找不到指定的网卡ID |
NetworkInterfaceHasAttached | The network interface has been attached to instance. | 400 | 指定的网卡已经被绑定到实例 |
NetworkInterfaceAZIsNotSameWithVM | The network interface must be in the same availability zone with attached instance [{0}] | 400 | 网卡和待绑定的实例必须处于同一个可用区 |
SubnetIsNotNormal | Subnet type must Normal | 400 | 选择的子网的类型必须是普通子网 |
PrivateIPNotMatchDhcp | PrivateIpAddress is exceed Subnet's DHCP Range | 400 | PrivateIpAddress超过子网设置的DHCP范围 |
VifIdInvalid | Network interface ID is invalid | 400 | 网卡ID无效 |
AvailableIpNumberNotEnoughForAttachNetworkInterface | The available IP number {1} is insufficient to attach networkInterface under the subnet {0}. | 400 | 子网{0}下可用IP数量只有{1}个,无法进行挂载网卡操作. |
NetworkInterfaceConflictingParameter | Only One of NetworkInterfaceId or SubnetId parameters should be supplied | 400 | 暂无 |
SecurityGroupIdRequired | SecurityGroupId is required | 400 | SecurityGroupId必传 |
NetworkInterfaceOrSubnetIdRequired | Either the NetworkInterfaceId or the SubnetId should be specified | 400 | “NetworkInterfaceId“和“SubnetId“参数两者必须且只能指定其中一个 |
SubnetAndSecurityGroupNotMatch | Sub network[{0}] and security groups[{1}] must belong to the same VPC | 400 | 子网[{0}]和安全组[{1}]必须属于同一个VPC. |
SubnetAndPrivateIpAddressNotMatch | Private ip address is not in the sub network IP range or has been used | 400 | 私网IP不在子网的IP范围内或者已经被占用 |
NetworkInterfaceLimitExceeded | Each instance has reached the limit of the number of extension network interface | 400 | 主机绑定网卡数已超出限制 |
InstanceNotSupportIPv6NetworkInterface | The instance does not enable ipv6, can not specify IPv6 network interface | 400 | 因主机不支持IPv6,不能绑定指定IPv6地址的网卡 |
SecurityGroupIdInvalid | Security group id is invalid | 400 | 安全组ID无效 |
InstanceIdRequired | InstanceId is required | 400 | InstanceId必传 |
PrivateIpAddressInvalidParameterValue | An invalid or out-of-range value was supplied for the "PrivateIpAddress" parameter. | 400 | “私有IP地址”参数的取值无效或者超出有效范围 |
Ipv6 is not valid | 暂无 | 400 | 暂无 |
CheckMacAddress | The Mac address format of the input is incorrect. | 400 | 输入的主网卡mac地址内容格式不正确 |
纯净模式