You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
网卡
ModifyNetworkInterfaceAttributes - 修改网卡信息
复制全文
下载 pdf
ModifyNetworkInterfaceAttributes - 修改网卡信息
调用 ModifyNetworkInterfaceAttributes 接口,修改网卡的名称、描述、安全组、源/目的地址检查、随云服务器实例删除等信息。​
使用说明​
  • 以下可选参数如不配置,则保持原有配置。​
  • 单张网卡默认最多可关联5个安全组。若默认配额无法满足需求,请前往 配额中心 提升相应配额。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:ModifyNetworkInterfaceAttributes​
接口名称。当前 API 的名称为ModifyNetworkInterfaceAttributes。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
NetworkInterfaceId String 必选 示例值:eni-bp1fgnh68xyz9****​
网卡ID。​
您可以调用 DescribeNetworkInterfaces 接口,查询网卡的ID。​
​
NetworkInterfaceName String 可选 示例值:eni-1​
网卡的名称。​
  • 长度限制为1 ~ 128个字符。​
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。​
​
Description String 可选 示例值:eni-1-description​
网卡的描述信息。​
  • 长度限制为0~ 255个字符。​
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。​
​
SecurityGroupIds.N String 可选 示例值:sg-3cj59dpb0msxs6c6rrt1u****​
网卡加入的安全组列表。​
您可以调用 DescribeSecurityGroups 接口,查询安全组的ID。​
  • 指定的安全组必须与网卡在同一个VPC内。​
  • 参数 - N:表示安全组ID的序号,单次调用数量上限5个ID。​
  • 多个安全组用&分隔。​
​
PortSecurityEnabled Boolean 可选 示例值:false​
是否为网卡开启源/目的地址检查。 开启后,系统会自动阻止源地址或目的地址不是当前网卡的流量。​
请严格按照以下枚举值的大小写输入,不要传入其他取值。​
  • true:是。​
  • false:否。​
​
DeleteOnTermination Boolean 可选 示例值:false​
是否开启随云服务器实例删除。​
请严格按照以下枚举值的大小写输入,不要传入其他取值。​
  • true:开启。​
  • false:关闭。​
​
TcpEstablishedTimeout Integer 可选 示例值:910​
配置TCP连接空闲超时时间。即设置TCP连接无数据传输的最大保留时长,超时自动断开连接并释放会话资源。​
取值范围为30-7200秒。​
​
TcpClosedAndTimeWaitTimeout Integer 可选 示例值:3​
配置 TCP连接关闭超时时间。即设置TCP连接四次挥手关闭过程的最大等待响应时长,超时未完成挥手则强制断开连接、释放会话资源。​
取值范围为3-15秒。​
​
UdpTimeout Integer 可选 示例值:32​
配置UDP流超时时间。即设置双向UDP会话无往返流量的最大空闲保留时长,超时自动删除会话、释放资源。​
取值范围为10-180秒。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=ModifyNetworkInterfaceAttributes&Version=2020-04-01&NetworkInterfaceId=eni-bp1fgnh68xyz9****&NetworkInterfaceName=ENI_1 HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ModifyNetworkInterfaceAttributes",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
Forbidden.TrafficMode​
You are not authorized to perform operations on the specified network interface.​
您无权在指定的网络接口上执行操作。​
400​
InvalidDescription.Malformed​
The specified description is malformed.​
指定的描述格式不合法。请修复描述格式后重试。​
400​
InvalidDescription.Malformed​
The specified description is malformed. Ensure the maximum length of description is 255.​
指定的描述格式不合法。描述长度不能超过255个字符。​
400​
InvalidEni.InvalidStatus​
The specified elastic network interface is not in the correct status for the request.​
指定的弹性网卡所处的状态无法响应该请求。​
400​
InvalidEni.InvalidType​
The type of specified elastic network interface is illegal for the request.​
指定类型的弹性网卡无法响应该请求。​
400​
InvalidInstance.InvalidStatus​
The specified instance is not in the correct status for the request.​
指定的ECS实例所处的状态无法响应该请求。​
400​
InvalidInstance.InvalidType​
The specified instance type is invalid for the request.​
指定的ECS实例规格无法响应该请求。​
400​
InvalidInstance.Malformed​
The specified instance does not support vRDMA currently.​
指定的ECS实例当前不支持vRDMA。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidName.Malformed​
The specified name is malformed. Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidNetworkInterface.InvalidType​
The type of specified elastic network interface is illegal for the request.​
指定类型的弹性网卡无法响应该请求。​
400​
InvalidNetworkInterfaceTrafficMode.InvalidAvailabilityZone​
The specified elastic network interface availability zone does not support vRDMA currently.​
指定的网卡可用区当前不支持vRDMA。​
400​
InvalidSecurityGroup.InvalidStatus​
The specified security group is not in the correct status for the request.​
指定的安全组所处的状态无法响应该请求。​
400​
InvalidSecurityGroup.VpcMismatch​
The specified security group and elastic network interface are not in the same VPC.​
指定的安全组和弹性网卡不在同一个VPC。​
400​
InvalidVrdmaEnable.JumboFrameMismatch​
The specified instance is not supported to enable vRDMA without jumbo frame enabled.​
指定的实例在未启用JumboFrame的情况下,不支持启用vRDMA。​
400​
LimitExceeded.HighPerformanceEnisPerInstance​
You've reached the limit on the number of high performance elastic network interfaces that can be attached to the specified instance.​
已达到该ECS实例可绑定的高性能弹性网卡的数量上限。​
400​
QuotaExceeded.EniSecurityGroup​
You've reached the limit on the number of elastic network interfaces that a security group can associate.​
已达到安全组可关联的弹性网卡数量上限。​
400​
QuotaExceeded.SecurityGroup​
The number of security groups bound to the ENI exceeded quota.​
当前网卡已达到可创建安全组的数量上限。​
400​
QuotaExceeded.SecurityGroupIp​
The number of IP addresses bound to the security group exceeded quota.​
已达到安全组可绑定IP地址的数量上限。​
403​
Forbidden​
You are not authorized to perform operations on ESI related resources.​
无权限操作弹性预约实例关联资源。​
403​
Forbidden​
You are not authorized to perform operations on the specified ENI. Only ENI attached to an ECS instance is supported.​
无权限对指定弹性网卡进行操作。只有挂载到ECS的网卡才能修改绑定信息。​
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 security group. The specified security group is a service-managed security group.​
无权限对指定安全组进行操作。指定的安全组为云产品托管的安全组。​
404​
InvalidEniId.NotFound​
The specified elastic network interface does not exist.​
指定的弹性网卡不存在。​
404​
InvalidInstance.NotFound​
The specified instance does not exist.​
指定的ECS实例不存在。​
404​
InvalidSecurityGroupId.NotFound​
The specified security group does not exist.​
指定的安全组不存在。​
404​
InvalidSubnet.NotFound​
The specified subnet does not exist.​
指定的子网不存在。​
409​
InvalidSecurityGroupId.Conflict​
The specified security group is duplicated with another security group associated with the same elastic network interface.​
指定的安全组已关联至该网卡,无法重复绑定。​
​
​
最近更新时间:2026.09.17 15:48:36
这个页面对您有帮助吗?
有用
有用
无用
无用