DescribeNetworkInterfaces

Last updated: 2021-05-12 10:21:27

1. API Description

Domain name for API request: vpc.tencentcloudapi.com.

This API (DescribeNetworkInterfaces) is used to query the ENI list.

A maximum of 100 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeNetworkInterfaces.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
NetworkInterfaceIds.N No Array of String Queries the ID of the ENI instance, such as eni-pxir56ns. Each request can have a maximum of 100 instances. NetworkInterfaceIds and Filters cannot be specified at the same time.
Filters.N No Array of Filter Filter condition. NetworkInterfaceIds and Filters cannot be specified at the same time.
  • vpc-id - String - (Filter condition) VPC instance ID, such as vpc-f49l6u0z.
  • subnet-id - String - (Filter condition) Subnet instance ID, such as subnet-f49l6u0z.
  • network-interface-id - String - (Filter condition) ENI instance ID, such as eni-5k56k7k7.
  • attachment.instance-id - String - (Filter condition) CVM instance ID, such as ins-3nqpdn3i.
  • groups.security-group-id - String - (Filter condition) Instance ID of the security group, such as sg-f9ekbxeq.
  • network-interface-name - String - (Filter condition) ENI instance name.
  • network-interface-description - String - (Filter condition) ENI instance description.
  • address-ip - String - (Filter condition) Private IPv4 address.
  • tag-key - String - Required: no - (Filter condition) Filters by tag key. For more information, see Example 2.
  • tag:tag-key - String - Required: no - (Filter condition) Filters by tag key pair. For this parameter, tag-key will be replaced with a specific tag key. For more information, see Example 3.
  • is-primary - Boolean - Required: no - (Filter condition) Filters based on whether it is a primary ENI. If the value is ‘true’, filter only the primary ENI. If the value is ‘false’, filter only the secondary ENI. If the secondary filter parameter is provided, filter the both.
  • Offset No Integer Offset. Default value: 0.
    Limit No Integer Number of returned results. Default value: 20. Maximum value: 100.

    3. Output Parameters

    Parameter Name Type Description
    NetworkInterfaceSet Array of NetworkInterface List of instance details.
    TotalCount Integer Number of eligible instances.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the ENI list

    Input Example

    https://vpc.tencentcloudapi.com/?Action=DescribeNetworkInterfaces
    &<Common request parameters>
    

    Output Example

    {
      "Response": {
        "NetworkInterfaceSet": [
          {
            "VpcId": "vpc-mrzkofih",
            "SubnetId": "subnet-nao8lfro",
            "NetworkInterfaceId": "eni-f1xjkw1b",
            "NetworkInterfaceName": "royhyangtest-main",
            "NetworkInterfaceDescription": "",
            "GroupSet": [
              "sg-c2r7lnxh",
              "sg-f9ekbxeq"
            ],
            "Primary": false,
            "MacAddress": "20: 90: 6F: F3: 3D: BD",
            "State": "AVAILABLE",
            "CreatedTime": "2017-11-16 19:56:00",
            "PrivateIpAddressSet": [
              {
                "Description": "",
                "Primary": true,
                "PrivateIpAddress": "192.168.0.13",
                "PublicIpAddress": "",
                "IsWanIpBlocked": false,
                "State": "AVAILABLE"
              },
              {
                "Description": "",
                "Primary": false,
                "PrivateIpAddress": "192.168.0.15",
                "PublicIpAddress": "",
                "IsWanIpBlocked": false,
                "State": "AVAILABLE"
              },