Modify an ENI

Last updated: 2019-11-29 16:51:50

PDF

1. API Description

This API (ModifyNetworkInterface) is used to modify ENIs.
Domain name for API requests: vpc.api.qcloud.com

2. Input Parameters

Below is a list of API request parameters. You need to add common request parameters to your request when calling this API. For more information, see the Common Request Parameters page. The Action field for this API is ModifyNetworkInterface.

Parameter name Required Type Description
vpcId Yes String VPC ID of the ENI, for example: vpc-7t9nf3pu.
networkInterfaceId Yes String ENI ID assigned by the system, for example: eni-m6dyj72l.
eniName Yes String ENI name, which cannot exceed 60 characters.
eniDescription No String ENI description, which cannot exceed 60 characters.

3. Output Parameters

Parameter name Type Description
code Int Error code. 0: Successful; other values: Failed.
message String Error message

4. Error Codes

The following error codes only include business logic error codes for this API.
| Error code | Description |
|---------|---------|
| InvalidVpc.NotFound | Invalid VPC. This error code indicates that the VPC resource does not exist. In this case, check whether the resource information that you entered is correct. You can query the VPC through the API DescribeVpcEx. |
| InvalidNetworkInterface.NotFound | Invalid ENI. This error code indicates that the ENI does not exist. In this case, verify whether the resource information that you entered is correct. You can query the ENI through the API DescribeNetworkInterfaces. |

5. Sample

Input

https://vpc.api.qcloud.com/v2/index.php?Action=ModifyNetworkInterface
&>
&vpcId=vpc-7t9nf3pu
&networkInterfaceId=eni-m6dyj72l
&eniName=barrytest

Output

{
    "code": 0,
    "message": "",
    "codeDesc": "Success"
}