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/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/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>
def get_network_interface(filters: Optional[Sequence[GetNetworkInterfaceFilter]] = None,
                          id: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetNetworkInterfaceResult
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<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 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 Sequence[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 Mapping[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 Sequence[GetNetworkInterfaceAssociation]
The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
attachments Sequence[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 Sequence[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 Sequence[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 Sequence[str]
The list of security groups for the network interface.
subnet_id str
The ID of the subnet.
tags Mapping[str, str]
Any tags assigned to the network interface.
vpc_id str
The ID of the VPC.
filters Sequence[GetNetworkInterfaceFilter]

Supporting Types

GetNetworkInterfaceAssociation

AllocationId string
The allocation ID.
AssociationId string
The association ID.
CarrierIp string
The carrier IP address associated with the network interface. This attribute is only set when the network interface is in a subnet which is associated with a Wavelength Zone.
CustomerOwnedIp string
The customer-owned IP address.
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.
CarrierIp string
The carrier IP address associated with the network interface. This attribute is only set when the network interface is in a subnet which is associated with a Wavelength Zone.
CustomerOwnedIp string
The customer-owned IP address.
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.
carrierIp string
The carrier IP address associated with the network interface. This attribute is only set when the network interface is in a subnet which is associated with a Wavelength Zone.
customerOwnedIp string
The customer-owned IP address.
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.
carrier_ip str
The carrier IP address associated with the network interface. This attribute is only set when the network interface is in a subnet which is associated with a Wavelength Zone.
customer_owned_ip str
The customer-owned IP address.
ip_owner_id str
The ID of the Elastic IP address owner.
public_dns_name str
The public DNS name.
public_ip str
The address of the Elastic IP address bound to the network interface.

GetNetworkInterfaceAttachment

GetNetworkInterfaceFilter

Name string
Values List<string>
Name string
Values []string
name string
values string[]
name str
values Sequence[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.