All Products
Search
Document Center

Elastic Compute Service:ModifyNetworkInterfaceAttribute

Last Updated:Jul 24, 2024

Modifies the attributes, such as the name, description, and security group of an elastic network interface (ENI).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the ENI. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
NetworkInterfaceNamestringNo

The name of the ENI. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

This parameter is left empty by default.

eniTestName
NetworkInterfaceIdstringYes

The ID of the ENI.

eni-bp67acfmxazb4p****
QueueNumberintegerNo

The number of queues supported by the ENI. Valid values: 1 to 2048.

  • You can change only the number of queues supported by the secondary ENI.
  • You can change the number of queues supported by the secondary ENI only when the ENI is in the Available state or the ENI is attached (InUse) to an instance that is in the Stopped state.
  • The number of queues supported by the secondary ENI cannot exceed the maximum number of queues that the instance allows for each ENI. The total number of queues for all ENIs on the instance cannot exceed the queue quota that the instance allows. To query the maximum number of queues per ENI and the queue quota for an instance type, you can call the DescribeInstanceTypes operation and check the values of MaximumQueueNumberPerEni and TotalEniQueueQuantity in the response.
8
DescriptionstringNo

The description of the ENI. The description must be 2 to 255 characters in length and cannot start with http:// or https://.

This parameter is left empty by default.

testDescription
SecurityGroupIdarrayNo

The IDs of the security groups to which to add the secondary ENI. The secondary ENI is added to the specified security groups and removed from the original security groups.

  • The valid values of N vary based on the maximum number of security groups to which an ENI can be added. For more information, see the Security group limits section of the "Limits and quotas" topic.
  • The new security groups take effect after a short delay.
stringNo

The ID of security group N.

  • The valid values of N vary based on the maximum number of security groups to which an ENI can be added. For more information, see the Security group limits section of the "Limits and quotas" topic.
  • You can change only the security groups to which a secondary ENI is added.
  • After you specify this parameter, the secondary ENI is added to the specified security groups and removed from the original security groups.
  • The new security groups take effect after a short delay.
sg-bp67acfmxazb4p****
DeleteOnReleasebooleanNo

Specifies whether to release the ENI when the associated instance is released. Valid values:

  • true
  • false
true
RxQueueSizeintegerNo

The receive (Rx) queue depth of the ENI.

Take note of the following items:

  • The Rx queue depth of an ENI must be the same as the transmit (Tx) queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384.
  • A larger Rx queue depth yields higher inbound throughput but consumes more memory.
8192
TxQueueSizeintegerNo

The Tx queue depth of the ENI.

Take note of the following items:

  • The Tx queue depth of an ENI must be the same as the Rx queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384.
  • A larger Tx queue depth yields higher outbound throughput but consumes more memory.
8192
EnhancedNetworkobjectNo

This parameter is not publicly available.

EnableSriovbooleanNo

This parameter is not publicly available.

NetworkInterfaceTrafficConfigobjectNo

The communication parameters of the ENI.

NetworkInterfaceTrafficModestringNo

The communication mode of the ENI. Valid values:

  • Standard: uses the TCP communication mode.
  • HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.

When the ENI is in the InUse state, take note of the following items:

  • The total number of ERIs attached to the instance cannot exceed the ERI quota for the instance type. To query the ERI quota for an instance type, call the DescribeInstanceTypes operation and check the EriQuantity value in the response.
Note This parameter is in invitational preview and is not publicly available.
HighPerformance
QueueNumberintegerNo

The number of queues supported by the ENI. When the ENI is in the InUse state, take note of the following items:

  • The value of this parameter cannot exceed the maximum number of queues allowed per ENI for the instance type.
  • The total number of queues for all ENIs on the instance cannot exceed the queue quota for the instance type. To query the maximum number of queues per ENI and the queue quota for an instance type, call the DescribeInstanceTypes operation and check the MaximumQueueNumberPerEnig and TotalEniQueueQuantity values in the response.
Note This parameter is in invitational preview and is not publicly available.
8
QueuePairNumberintegerNo

The number of queues supported by the ERI. When the ERI is in the InUse state, take note of the following items:

  • The value of this parameter cannot exceed the maximum number of queues allowed per ERI for the instance type. To query the maximum number of queues allowed per ERI for an instance type, call the DescribeInstanceTypes operation and check the QueuePairNumber value in the response.
Note This parameter is in invitational preview and is not publicly available.
8
RxQueueSizeintegerNo

The receive (Rx) queue depth of the ENI.

Take note of the following items:

  • The Rx queue depth of an ENI must be the same as the transmit (Tx) queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384.
  • A larger Rx queue depth yields higher inbound throughput but consumes more memory.
Note This parameter is in invitational preview and is not publicly available.
8192
TxQueueSizeintegerNo

The Tx queue depth of the ENI.

Take note of the following items:

  • The Tx queue depth of an ENI must be the same as the Rx queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384.
  • A larger Tx queue depth yields higher outbound throughput but consumes more memory.
Note This parameter is in invitational preview and is not publicly available.
8192
ConnectionTrackingConfigurationobjectNo

This parameter is not publicly available.

TcpEstablishedTimeoutintegerNo

This parameter is not publicly available.

TcpClosedAndTimeWaitTimeoutintegerNo

This parameter is not publicly available.

UdpTimeoutintegerNo

This parameter is not publicly available.

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidOperation.NotSupportModifyQueueNumber%s-
400MissingParameter%sA parameter is not specified.
400UnsupportedParameter%sThe parameter is not supported.
400InvalidParameter%sThe specified parameter is invalid.
400InvalidInstanceID.Malformed%sThe specified InstanceId parameter is invalid.
400InvalidOperation.InvalidEcsState%s-
400InvalidOperation.InvalidEniState%s-
400InvalidOperation.DetachPrimaryEniNotAllowed%s-
400InvalidParams.EniId%sThe specified EniId parameter is invalid.
400Forbidden.RegionId%sThe service is unavailable in the current region.
400JoinedGroupLimitExceed%sThe maximum number of security groups to which the specified resource can be added has been reached. For more information, see the return value of the %s placeholder in the error message.
400InvalidEniQueueSize.RegionOrUserNotSupportedThe specified parameter RxQueueSize or TxQueueSize is not supported in this region, or this account is not in the whitelist of using eni QueueSize.You are not authorized to specify the length of NIC queues or cannot specify the length of NIC queues in the current region.
400InvalidParameter.EniQueueSizeThe specified parameter TxQueueSize and RxQueueSize are not equal or exceed limit.The specified parameter TxQueueSize and RxQueueSize are not equal or exceed limit.
400InvalidParameter.Conflict%sThe specified parameter is invalid. Check whether parameter conflicts exist. %s is a variable. An error message is dynamically returned based on call conditions.
400InvalidConnectionTrackingConfiguration.RegionOrUserNotSupportedThe specified parameter ConnectionTrackingConfiguration is not supported in this region, or this account is not in the whitelist of using network interface ConnectionTrackingConfiguration.The specified parameter ConnectionTrackingConfiguration is not supported in this region, or this account is not in the whitelist of using network interface ConnectionTrackingConfiguration.
400InvalidParameter.InvalidQueuePairNumberThe specified parameter QueuePairNumber exceeds limit.The number of queues on the specified ERI exceeds the limit.
400InvalidParameter.EniConnectionTrackingConfigurationThe specify network interface connection tracking configuration exceeds limit.The network connection configuration of the ENI is out of range.
400InvalidOperation.MaxEniQueuePairNumberExceedThe QueuePairNumber on the RDMA ENI exceeds the upper limit allowed for a single ENI.The number of RDMA queues on the ENI exceeds the maximum number of RDMA queues allowed per ENI.
400InvalidOperation.HighPerformanceEniPerInstanceLimitExceededThe number of RDMA ENIs attached to the ECS instance exceeds the upper limit.The number of eRDMA interfaces (ERIs) on the ECS instance to which the ENI is attached exceeds the upper limit.
400InvalidOperation.InstanceTypeNotSupportHighPerformanceThe ECS instance type where the ENI is located does not support the RDMA mode.The instance type of the ECS instance to which the ENI is attached does not support the RDMA communication mode.
400InvalidTrafficMode.ModifyToStandardNotSupportedThe specified parameter NetworkInterfaceTrafficMode is not supported to modify to Standard.You cannot set the NetworkInterfaceTrafficMode parameter of the ENI to Standard.
400InvalidOperation.EniTrafficModeNotSupportIPv6The ENI using High Performance traffic mode does not support IPv6.ENIs that use the RDMA communication mode do not support IPv6.
400InvalidOperation.EniQueuePairNumberOverflowThe RDMA QueuePairNumber of the ECS instance associated with the specified ENI exceeds the limit.The number of RDMA queues on ENIs of the ECS instance to which the specified ENI is attached exceeds the upper limit.
400InvalidParameter.QueuePairNumberMustEmptyWhen the traffic mode is set to Standard, the QueuePairNumber must be empty.When you create an ENI that uses the TCP communication mode, do not specify the number of RDMA queues for the ENI.
400InvalidParameter.EniTrafficModeThe ENI traffic mode is set incorrectly, it must be either Standard or HighPerformance.The NetworkInterfaceTrafficMode value is invalid. Valid values: Standard and HighPerformance.
403InvalidUserType.NotSupported%sYour account does not support this operation.
403Abs.InvalidAccount.NotFound%sYour Alibaba Cloud account does not exist or your AccessKey pair has expired.
403Forbidden.NotSupportRAM%sRAM users are not authorized to perform this operation.
403Forbidden.SubUser%sYou are not authorized to manage this resource. Contact the owner of the Alibaba Cloud account for authorization.
403MaxEniCountExceeded%sThe maximum number of ENIs that can be managed has been reached.
403EniPerInstanceLimitExceeded%sThe maximum number of ENIs that can be attached to the specified instance has been reached.
403InvalidOperation.AvailabilityZoneMismatch%sThe operation is invalid.
403InvalidOperation.VpcMismatch%sThe operation is invalid. Check whether the VPC in the operation corresponds to other parameters.
403SecurityGroupInstanceLimitExceed%s-
403InvalidSecurityGroupId.NotVpc%sThe specified SecurityGroupId parameter is invalid and the network type of the security group is not VPC.
403InvalidOperation.InvalidEniType%s-
403InvalidOperation.EniServiceManaged%sThe operation is invalid.
403InvalidOperation.MultiGroupTypeThe specified instance can't join different types of security group.-
403InvalidOperation.EniCountExceededThe maximum number of eni in a enterprise level security group is exceeded.-
403InvalidParams.NetworkInterfaceName%s-
403InvalidOperation.ModifyPrimaryEniQueueNumberPrimary NetworkInterface is not allowed to modify queue number.-
403InvalidOperation.InvalidEniStateAvailable status or ECS instance attached is Stopped is allowed to modify network interface queue number.-
403InvalidOperation.ResourceManagedByCloudProduct%sYou cannot modify security groups managed by cloud services.
403InvalidParameter.InvalidEniQueueNumber%s-
403InvalidOperation.MaxEniQueueNumberExceeded%s-
403InvalidOperation.ExceedInstanceTypeQueueNumber%sThe maximum number of queues for all ENIs on an instance has been exceeded. For more information, see the return value of the %s placeholder in the error message.
403AclLimitExceed%sThe number of ACL rules for an ENI or instance exceeds the upper limit.
404InvalidEcsId.NotFound%sThe specified instance ID does not exist.
404InvalidEniId.NotFound%sThe specified ENI ID does not exist.
404InvalidVSwitchId.NotFound%sThe specified vSwitch does not exist.
404InvalidSecurityGroupId.NotFound%sThe specified security group ID does not exist.
404InvalidOperation.PrimaryEniOnlySupportModifyNameAndDescPrimary NetworkInterface is only allowed to modify name and description.Primary ENIs can only have their names and descriptions modified.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-03The Error code has changedView Change Details
2024-07-03The Error code has changed. The request parameters of the API has changedView Change Details
2024-05-17The Error code has changed. The request parameters of the API has changedView Change Details
2024-05-07The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-24The Error code has changed. The request parameters of the API has changedView Change Details
2023-10-09The Error code has changed. The request parameters of the API has changedView Change Details
2023-06-14The Error code has changedView Change Details