turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_ecs_network_interface

An elastic network interface (ENI) is a virtual network interface controller (NIC) that can be bound to a VPC-type ECS instance. You can use ENIs to deploy high availability clusters and perform low-cost failover and fine-grained network management.

Examples

Basic ENI info

select
network_interface_id,
type,
description,
status,
instance_id,
private_ip_address,
associated_public_ip_address,
mac_address
from
alicloud_ecs_network_interface;

Find all ENIs with private IPs that are in a given subnet (10.66.0.0/16)

select
network_interface_id,
type,
description,
private_ip_address,
associated_public_ip_address,
mac_address
from
alicloud_ecs_network_interface
where
private_ip_address <<= '10.66.0.0/16';

Count of ENIs by interface type

select
type,
count(type) as count
from
alicloud_ecs_network_interface
group by
type
order by
count desc;

Security groups attached to each ENI

select
network_interface_id as eni,
sg
from
alicloud_ecs_network_interface
cross join jsonb_array_elements(security_group_ids) as sg
order by
eni;

Find ENIs for a specific instance

select
network_interface_id as eni,
instance_id,
status,
type,
description,
private_ip_address,
associated_public_ip_address,
mac_address
from
alicloud_ecs_network_interface
where
instance_id = 'i-0xi8u2s0ezl5auigem8t'

.inspect alicloud_ecs_network_interface

Alicloud ECS Network Interface.

NameTypeDescription
account_idtextThe alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
associated_public_ip_addressinetThe public IP address of the instance.
associated_public_ip_allocation_idtextThe allocation ID of the EIP.
attachmentjsonbAttachments of the ENI
creation_timetimestamp without time zoneThe time when the ENI was created.
descriptiontextThe description of the ENI.
instance_idtextThe ID of the instance to which the ENI is bound.
ipv6_setsjsonbThe IPv6 addresses assigned to the ENI.
mac_addresstextThe MAC address of the ENI.
nametextThe name of the ENI.
network_interface_idtextAn unique identifier for the ENI.
owner_idtextThe ID of the account that owns the ENI.
private_ip_addressinetThe private IP address of the ENI.
private_ip_setsjsonbThe private IP addresses of the ENI.
queue_numberbigintThe number of queues supported by the ENI.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group to which the ENI belongs.
security_group_idsjsonbThe IDs of the security groups to which the ENI belongs.
service_idtextThe ID of the distributor to which the ENI belongs.
service_managedbooleanIndicates whether the user is an Alibaba Cloud service or a distributor.
statustextThe status of the ENI.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
titletextTitle of the resource.
typetextThe type of the ENI. Valid values: 'Primary' and 'Secondary'
vpc_idtextThe ID of the VPC to which the ENI belongs.
vswitch_idtextThe ID of the VSwitch to which the ENI is connected.
zone_idtextThe zone ID of the ENI.