GetNetworkInterface

Use this data source to get information about a Network Interface.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var bar = Output.Create(Aws.Ec2.GetNetworkInterface.InvokeAsync(new Aws.Ec2.GetNetworkInterfaceArgs
        {
            Id = "eni-01234567",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "eni-01234567"
        _, err := ec2.LookupNetworkInterface(ctx, &ec2.LookupNetworkInterfaceArgs{
            Id: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

bar = aws.ec2.get_network_interface(id="eni-01234567")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const bar = pulumi.output(aws.ec2.getNetworkInterface({
    id: "eni-01234567",
}, { async: true }));

Using GetNetworkInterface

function getNetworkInterface(args: GetNetworkInterfaceArgs, opts?: InvokeOptions): Promise<GetNetworkInterfaceResult>
function  get_network_interface(filters=None, id=None, tags=None, opts=None)
func LookupNetworkInterface(ctx *Context, args *LookupNetworkInterfaceArgs, opts ...InvokeOption) (*LookupNetworkInterfaceResult, error)

Note: This function is named LookupNetworkInterface in the Go SDK.

public static class GetNetworkInterface {
    public static Task<GetNetworkInterfaceResult> InvokeAsync(GetNetworkInterfaceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetNetworkInterfaceFilterArgs>

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.

Id string

The identifier for the network interface.

Tags Dictionary<string, string>

Any tags assigned to the network interface.

Filters []GetNetworkInterfaceFilter

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.

Id string

The identifier for the network interface.

Tags map[string]string

Any tags assigned to the network interface.

filters GetNetworkInterfaceFilter[]

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.

id string

The identifier for the network interface.

tags {[key: string]: string}

Any tags assigned to the network interface.

filters List[GetNetworkInterfaceFilter]

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.

id str

The identifier for the network interface.

tags Dict[str, str]

Any tags assigned to the network interface.

GetNetworkInterface Result

The following output properties are available:

Associations List<GetNetworkInterfaceAssociation>

The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.

Attachments List<GetNetworkInterfaceAttachment>
AvailabilityZone string

The Availability Zone.

Description string

Description of the network interface.

Id string
InterfaceType string

The type of interface.

Ipv6Addresses List<string>

List of IPv6 addresses to assign to the ENI.

MacAddress string

The MAC address.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

OwnerId string

The AWS account ID of the owner of the network interface.

PrivateDnsName string

The private DNS name.

PrivateIp string

The private IPv4 address of the network interface within the subnet.

PrivateIps List<string>

The private IPv4 addresses associated with the network interface.

RequesterId string

The ID of the entity that launched the instance on your behalf.

SecurityGroups List<string>

The list of security groups for the network interface.

SubnetId string

The ID of the subnet.

Tags Dictionary<string, string>

Any tags assigned to the network interface.

VpcId string

The ID of the VPC.

Filters List<GetNetworkInterfaceFilter>
Associations []GetNetworkInterfaceAssociation

The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.

Attachments []GetNetworkInterfaceAttachmentType
AvailabilityZone string

The Availability Zone.

Description string

Description of the network interface.

Id string
InterfaceType string

The type of interface.

Ipv6Addresses []string

List of IPv6 addresses to assign to the ENI.

MacAddress string

The MAC address.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

OwnerId string

The AWS account ID of the owner of the network interface.

PrivateDnsName string

The private DNS name.

PrivateIp string

The private IPv4 address of the network interface within the subnet.

PrivateIps []string

The private IPv4 addresses associated with the network interface.

RequesterId string

The ID of the entity that launched the instance on your behalf.

SecurityGroups []string

The list of security groups for the network interface.

SubnetId string

The ID of the subnet.

Tags map[string]string

Any tags assigned to the network interface.

VpcId string

The ID of the VPC.

Filters []GetNetworkInterfaceFilter
associations GetNetworkInterfaceAssociation[]

The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.

attachments GetNetworkInterfaceAttachment[]
availabilityZone string

The Availability Zone.

description string

Description of the network interface.

id string
interfaceType string

The type of interface.

ipv6Addresses string[]

List of IPv6 addresses to assign to the ENI.

macAddress string

The MAC address.

outpostArn string

The Amazon Resource Name (ARN) of the Outpost.

ownerId string

The AWS account ID of the owner of the network interface.

privateDnsName string

The private DNS name.

privateIp string

The private IPv4 address of the network interface within the subnet.

privateIps string[]

The private IPv4 addresses associated with the network interface.

requesterId string

The ID of the entity that launched the instance on your behalf.

securityGroups string[]

The list of security groups for the network interface.

subnetId string

The ID of the subnet.

tags {[key: string]: string}

Any tags assigned to the network interface.

vpcId string

The ID of the VPC.

filters GetNetworkInterfaceFilter[]
associations List[GetNetworkInterfaceAssociation]

The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.

attachments List[GetNetworkInterfaceAttachment]
availability_zone str

The Availability Zone.

description str

Description of the network interface.

id str
interface_type str

The type of interface.

ipv6_addresses List[str]

List of IPv6 addresses to assign to the ENI.

mac_address str

The MAC address.

outpost_arn str

The Amazon Resource Name (ARN) of the Outpost.

owner_id str

The AWS account ID of the owner of the network interface.

private_dns_name str

The private DNS name.

private_ip str

The private IPv4 address of the network interface within the subnet.

private_ips List[str]

The private IPv4 addresses associated with the network interface.

requester_id str

The ID of the entity that launched the instance on your behalf.

security_groups List[str]

The list of security groups for the network interface.

subnet_id str

The ID of the subnet.

tags Dict[str, str]

Any tags assigned to the network interface.

vpc_id str

The ID of the VPC.

filters List[GetNetworkInterfaceFilter]

Supporting Types

GetNetworkInterfaceAssociation

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AllocationId string

The allocation ID.

AssociationId string

The association ID.

IpOwnerId string

The ID of the Elastic IP address owner.

PublicDnsName string

The public DNS name.

PublicIp string

The address of the Elastic IP address bound to the network interface.

AllocationId string

The allocation ID.

AssociationId string

The association ID.

IpOwnerId string

The ID of the Elastic IP address owner.

PublicDnsName string

The public DNS name.

PublicIp string

The address of the Elastic IP address bound to the network interface.

allocationId string

The allocation ID.

associationId string

The association ID.

ipOwnerId string

The ID of the Elastic IP address owner.

publicDnsName string

The public DNS name.

publicIp string

The address of the Elastic IP address bound to the network interface.

allocation_id str

The allocation ID.

association_id str

The association ID.

ipOwnerId str

The ID of the Elastic IP address owner.

publicDnsName str

The public DNS name.

public_ip str

The address of the Elastic IP address bound to the network interface.

GetNetworkInterfaceAttachment

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AttachmentId string
DeviceIndex int
InstanceId string
InstanceOwnerId string
AttachmentId string
DeviceIndex int
InstanceId string
InstanceOwnerId string
attachmentId string
deviceIndex number
instanceId string
instanceOwnerId string
attachment_id str
device_index float
instance_id str
instance_owner_id str

GetNetworkInterfaceFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string
Values List<string>
Name string
Values []string
name string
values string[]
name str
values List[str]

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.