You need to enable JavaScript to run this app.
导航

ModifyNetworkInterfaceAttributes

最近更新时间2024.01.10 10:41:29

首次发布时间2021.07.29 14:11:54

调用 ModifyNetworkInterfaceAttributes 接口,修改网卡(主网卡、辅助网卡)的信息。

调用说明

  • 以下可选参数如不配置,则保持原有配置。
  • 火山引擎官方服务网卡不支持修改。
  • 单张网卡默认最多可关联5个安全组。若默认配额无法满足需求,请前往 配额中心 提升相应配额。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringModifyNetworkInterfaceAttributes要执行的操作。取值:ModifyNetworkInterfaceAttributes。
VersionString2020-04-01API版本信息,取值为: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

SecurityGroupIds.1=sg-3cj59dpb0msxs6c6rrt1u****&SecurityGroupIds.2=sg-3fjrkjffjg34krrj0e****

网卡加入的安全组列表。
您可以调用 DescribeSecurityGroups 接口,查询安全组的ID。

  • 指定的安全组必须与网卡在同一个VPC内。
  • 参数 - N:表示安全组ID的序号,单次调用数量上限5个ID。
  • 多个安全组用&分隔。

PortSecurityEnabled

Boolean

false

是否为网卡开启源/目的地址检查。 开启后,系统会自动阻止源地址或目的地址不是当前网卡的流量。

  • true:是。
  • false:否。

DeleteOnTermination

Boolean

false

是否开启随云服务器实例删除。

  • true:开启。
  • false(默认值):关闭。

说明

辅助网卡开启随云服务器实例删除的功能正在邀测中,如需使用,请提交工单或联系客户经理。

返回数据

参数名称
类型
示例值
描述
RequestIdString2021062415303301022514515207C4****请求ID。

请求示例

GET /?Action=ModifyNetworkInterfaceAttributes&Version=2020-04-01&NetworkInterfaceId=eni-bp1fgnh68xyz9****&NetworkInterfaceName=ENI_1 HTTP/1.1
Host: open.volcengineapi.com
Service: vpc
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "ModifyNetworkInterfaceAttributes",
        "Version": "2020-04-01",
        "Service": "vpc",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "2021062415303301022514515207C4****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode
错误码
错误信息
描述
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400InvalidEni.InvalidStatusThe specified elastic network interface is not in the correct status for the request.指定的弹性网卡所处的状态无法响应该请求。
400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidSecurityGroup.VpcMismatchThe specified security group and elastic network interface are not in the same VPC.指定的安全组和弹性网卡不在同一个VPC。
400QuotaExceeded.EniSecurityGroupYou've reached the limit on the number of elastic network interfaces that a security group can associate.已达到安全组可关联的弹性网卡数量上限。
400QuotaExceeded.SecurityGroupThe number of security groups bound to the ENI exceeded quota.已达到当前网卡可绑定安全组的数量上限。
400QuotaExceeded.SecurityGroupIpThe number of IP addresses bound to the security group exceeded quota.已达到安全组可绑定IP地址的数量上限。
403ForbiddenYou are not authorized to perform operations on ESI related resources.无权限操作弹性预约实例关联资源。
403ForbiddenYou are not authorized to perform operations on the specified elastic network interface. The specified elastic network interface is a service-managed elastic network interface.无权限对指定弹性网卡进行操作。指定的弹性网卡为云产品托管的弹性网卡。
403ForbiddenYou are not authorized to perform operations on the specified security group. The specified security group is a service-managed security group.无权限对指定安全组进行操作。指定的安全组为云产品托管的安全组。
403ForbiddenYou are not authorized to perform operations on the specified ENI attachment.无权限对指定网卡绑定信息进行操作。
403ForbiddenYou are not authorized to perform operations on the specified ENI. Only ENI attached to an ECS instance is supported.无权限对指定弹性网卡进行操作。只有挂载到ECS的网卡才能修改绑定信息。
404InvalidEniId.NotFoundThe specified elastic network interface does not exist.指定的弹性网卡不存在。
404InvalidSecurityGroupId.NotFoundThe specified security group does not exist.指定的安全组不存在。
409InvalidSecurityGroupId.ConflictThe specified security group is duplicated with another security group associated with the same elastic network interface.指定的安全组已关联至该网卡,无法重复绑定。