Modifies the attributes of an elastic network interface (ENI), such as the name, description, and security groups of the ENI.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | ModifyNetworkInterfaceAttribute | The operation that you want to perform. Set the value to ModifyNetworkInterfaceAttribute. |
RegionId | String | Yes | cn-hangzhou | The region ID of the ENI. You can call the DescribeRegions operation to query the most recent region list. |
NetworkInterfaceName | String | No | eniTestName | 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://. It can contain digits, letters, colons (:), underscores (_), and hyphens (-). This parameter is empty by default. |
NetworkInterfaceId | String | Yes | eni-bp67acfmxazb4p**** | The ID of the ENI. |
QueueNumber | Integer | No | 8 | The number of queues supported by the ENI. Valid values: 1 to 2048.
|
Description | String | No | testDescription | 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 empty by default. |
SecurityGroupId.N | String | No | sg-bp67acfmxazb4p**** | The ID of security group N to which to add the ENI.
|
DeleteOnRelease | Boolean | No | true | Specifies whether to retain the ENI when the associated instance is released. Valid values:
|
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The ID of the request. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=ModifyNetworkInterfaceAttribute
&RegionId=cn-hangzhou
&NetworkInterfaceName=eniTestName
&NetworkInterfaceId=eni-bp67acfmxazb4p****
&Description=testDescription
&SecurityGroupId=["sg-bp67acfmxazb4p****"]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyNetworkInterfaceAttributeResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</ModifyNetworkInterfaceAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | MissingParameter | %s | A required parameter is not specified. |
400 | UnsupportedParameter | %s | A specified parameter is not supported. |
400 | InvalidParameter | %s | Invalid parameter value. |
400 | InvalidInstanceID.Malformed | %s | Invalid InstanceId format. |
400 | InvalidOperation.InvalidEcsState | %s | This operation cannot be performed on the instance in the current state. |
400 | InvalidOperation.InvalidEniState | %s | This operation cannot be performed on the ENI in the current state. |
400 | InvalidOperation.DetachPrimaryEniNotAllowed | %s | The ENI cannot be detached from the instance. |
400 | InvalidParams.EniId | %s | Invalid ENI ID. |
400 | Forbidden.RegionId | %s | The service is unavailable in the region for the moment. |
400 | JoinedGroupLimitExceed | %s | The maximum number of security groups to which the specified resource can be added is exceeded. For more information, see the return value of the %s placeholder in the error message. |
403 | InvalidUserType.NotSupported | %s | The account does not support this operation. |
403 | Abs.InvalidAccount.NotFound | %s | Your Alibaba Cloud account is not found, or your AccessKey pair expired. |
403 | Forbidden.NotSupportRAM | %s | Resource Access Management (RAM) users do not have the permissions to perform this operation. |
403 | Forbidden.SubUser | %s | You have no access to the resource. Contact the owner of the Alibaba Cloud account. |
403 | MaxEniCountExceeded | %s | The maximum number of ENIs that can be managed is exceeded. |
403 | EniPerInstanceLimitExceeded | %s | The maximum number of ENIs that can be attached to the instance is exceeded. |
403 | InvalidOperation.AvailabilityZoneMismatch | %s | The operation is invalid. |
403 | InvalidOperation.VpcMismatch | %s | The operation is invalid. Check whether the virtual private cloud (VPC) in the operation corresponds to other parameters. |
403 | SecurityGroupInstanceLimitExceed | %s | The maximum number of instances in the security group is reached. |
403 | InvalidSecurityGroupId.NotVpc | %s | Invalid security group ID. The network type of the specified security group is not VPC. |
403 | InvalidOperation.InvalidEniType | %s | This operation cannot be performed on this type of ENI. |
403 | InvalidOperation.EniServiceManaged | %s | The operation is invalid. |
403 | InvalidOperation.ResourceManagedByCloudProduct | %s | The security groups managed by cloud services cannot be modified. |
403 | InvalidParameter.InvalidEniQueueNumber | %s | Invalid QueueNumber value. For more information, see the return value of the %s placeholder in the error message. |
403 | InvalidOperation.MaxEniQueueNumberExceeded | %s | The maximum number of queues on the ENI is exceeded. For more information, see the return value of the %s placeholder in the error message. |
403 | InvalidOperation.ExceedInstanceTypeQueueNumber | %s | The maximum number of queues on all ENIs on an instance is exceeded. For more information, see the return value of the %s placeholder in the error message |
403 | AclLimitExceed | %s | The maximum number of security group rules that can be applied to the ENI or the instance is exceeded. |
404 | InvalidEcsId.NotFound | %s | The instance ID is not found. |
404 | InvalidEniId.NotFound | %s | The ENI ID is not found. |
404 | InvalidVSwitchId.NotFound | %s | The vSwitch ID is not found. |
404 | InvalidSecurityGroupId.NotFound | %s | The security group ID is not found. |
404 | InvalidOperation.PrimaryEniOnlySupportModifyNameAndDesc | Primary 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, see Service error codes.