AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

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/v5/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.LookupNetworkInterface(ctx, &ec2.LookupNetworkInterfaceArgs{
			Id: pulumi.StringRef("eni-01234567"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var bar = Output.of(Ec2Functions.getNetworkInterface(GetNetworkInterfaceArgs.builder()
            .id("eni-01234567")
            .build()));

    }
}
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",
}));
variables:
  bar:
    Fn::Invoke:
      Function: aws:ec2:getNetworkInterface
      Arguments:
        id: eni-01234567

Using getNetworkInterface

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkInterface(args: GetNetworkInterfaceArgs, opts?: InvokeOptions): Promise<GetNetworkInterfaceResult>
function getNetworkInterfaceOutput(args: GetNetworkInterfaceOutputArgs, opts?: InvokeOptions): Output<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
def get_network_interface_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkInterfaceFilterArgs]]]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetNetworkInterfaceResult]
func LookupNetworkInterface(ctx *Context, args *LookupNetworkInterfaceArgs, opts ...InvokeOption) (*LookupNetworkInterfaceResult, error)
func LookupNetworkInterfaceOutput(ctx *Context, args *LookupNetworkInterfaceOutputArgs, opts ...InvokeOption) LookupNetworkInterfaceResultOutput

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

public static class GetNetworkInterface 
{
    public static Task<GetNetworkInterfaceResult> InvokeAsync(GetNetworkInterfaceArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkInterfaceResult> Invoke(GetNetworkInterfaceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkInterfaceResult> getNetworkInterface(GetNetworkInterfaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2/getNetworkInterface:getNetworkInterface
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<Pulumi.Aws.Ec2.Inputs.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 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 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.

filters List<Property Map>

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>

Any tags assigned to the network interface.

getNetworkInterface Result

The following output properties are available:

Arn string

The ARN of the network interface.

Associations List<Pulumi.Aws.Ec2.Outputs.GetNetworkInterfaceAssociation>

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

Attachments List<Pulumi.Aws.Ec2.Outputs.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<Pulumi.Aws.Ec2.Outputs.GetNetworkInterfaceFilter>
Arn string

The ARN of the network interface.

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
arn String

The ARN of the network interface.

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 Map<String,String>

Any tags assigned to the network interface.

vpcId String

The ID of the VPC.

filters List<GetNetworkInterfaceFilter>
arn string

The ARN of the network interface.

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[]
arn str

The ARN of the network interface.

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]
arn String

The ARN of the network interface.

associations List<Property Map>

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

attachments List<Property Map>
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 Map<String>

Any tags assigned to the network interface.

vpcId String

The ID of the VPC.

filters List<Property Map>

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.

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.

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.

GetNetworkInterfaceAttachment

GetNetworkInterfaceFilter

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.