CmdID

CmdID / aws / aws ec2

aws ec2 describe-network-interfaces

Describes the specified network interfaces or all your network interfaces. AWS CLI reference

1 example 6 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To describe your network interfaces

The following describe-network-interfaces example describes all your network interfaces.

aws ec2 describe-network-interfacesIdentify
Its output, shortened
{
    "NetworkInterfaces": [
        {
            "Status": "in-use",
            "MacAddress": "02:2f:8f:b0:cf:75",
            "SourceDestCheck": true,
            "VpcId": "vpc-a01106c2",
            "Description": "my network interface",
            "Association": {
                "PublicIp": "203.0.113.12",
                "AssociationId": "eipassoc-0fbb766a",
                "PublicDnsName": "ec2-203-0-113-12.compute-1.amazonaws.com",
                "IpOwnerId": "123456789012"
            },
            "NetworkInterfaceId": "eni-e5aa89a3",
            "PrivateIpAddresses": [
                {
                    "PrivateDnsName": "ip-10-0-1-17.ec2.internal",
                    "Association": {
                        "PublicIp": "203.0.113.12",
                        "AssociationId": "eipassoc-0fbb766a",
                        "PublicDnsName": "ec2-203-0-113-12.compute-1.amazonaws.com",
                        "IpOwnerId": "123456789012"
                    },
                    "Primary": true,
                    "PrivateIpAddress": "10.0.1.17"
                }
            ],
            "RequesterManaged": false,
            "Ipv6Addresses": [],
… 68 more lines

The following describe-network-interfaces example describes network interfaces that have a tag with the key Purpose and the value Prod.

aws ec2 describe-network-interfaces --filters Name=tag:Purpose,Values=ProdIdentify
--filtersOne or more filters.
Its output, shortened
{
    "NetworkInterfaces": [
        {
            "Status": "available",
            "MacAddress": "12:2c:bd:f9:bf:17",
            "SourceDestCheck": true,
            "VpcId": "vpc-8941ebec",
            "Description": "ProdENI",
            "NetworkInterfaceId": "eni-b9a5ac93",
            "PrivateIpAddresses": [
                {
                    "PrivateDnsName": "ip-10-0-1-55.ec2.internal",
                    "Primary": true,
                    "PrivateIpAddress": "10.0.1.55"
                },
                {
                    "PrivateDnsName": "ip-10-0-1-117.ec2.internal",
                    "Primary": false,
                    "PrivateIpAddress": "10.0.1.117"
                }
            ],
            "RequesterManaged": false,
            "PrivateDnsName": "ip-10-0-1-55.ec2.internal",
            "AvailabilityZone": "us-west-2d",
            "Ipv6Addresses": [],
            "Groups": [
                {
                    "GroupName": "MySG",
                    "GroupId": "sg-905002f5"
                }
… 13 more lines

For more information, see Elastic network interfaces in the Amazon EC2 User Guide.

Options

6 in the AWS CLI reference
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--filtersOne or more filters.
--include-managed-resourcesIndicates whether to include managed resources in the output.
--max-resultsThe maximum number of items to return for this request.
--network-interface-idsThe network interface IDs.
--next-tokenThe token returned from a previous paginated request.