AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.ec2.getNetworkInterface
Explore with Pulumi AI
Use this data source to get information about a Network Interface.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = aws.ec2.getNetworkInterface({
id: "eni-01234567",
});
import pulumi
import pulumi_aws as aws
bar = aws.ec2.get_network_interface(id="eni-01234567")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var bar = Aws.Ec2.GetNetworkInterface.Invoke(new()
{
Id = "eni-01234567",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetNetworkInterfaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var bar = Ec2Functions.getNetworkInterface(GetNetworkInterfaceArgs.builder()
.id("eni-01234567")
.build());
}
}
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<Get
Network Interface Filter> - 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
- Identifier for the network interface.
- Dictionary<string, string>
- Any tags assigned to the network interface.
- Filters
[]Get
Network Interface Filter - 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
- Identifier for the network interface.
- map[string]string
- Any tags assigned to the network interface.
- filters
List<Get
Network Interface Filter> - 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
- Identifier for the network interface.
- Map<String,String>
- Any tags assigned to the network interface.
- filters
Get
Network Interface Filter[] - 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
- Identifier for the network interface.
- {[key: string]: string}
- Any tags assigned to the network interface.
- filters
Sequence[Get
Network Interface Filter] - 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
- Identifier for the network interface.
- 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
- Identifier for the network interface.
- Map<String>
- Any tags assigned to the network interface.
getNetworkInterface Result
The following output properties are available:
- Arn string
- ARN of the network interface.
- Associations
List<Get
Network Interface Association> - Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- Attachments
List<Get
Network Interface Attachment> - Availability
Zone string - Availability Zone.
- Description string
- Description of the network interface.
- Id string
- Interface
Type string - Type of interface.
- Ipv6Addresses List<string>
- List of IPv6 addresses to assign to the ENI.
- Mac
Address string - MAC address.
- Outpost
Arn string - ARN of the Outpost.
- Owner
Id string - AWS account ID of the owner of the network interface.
- Private
Dns stringName - Private DNS name.
- Private
Ip string - Private IPv4 address of the network interface within the subnet.
- Private
Ips List<string> - Private IPv4 addresses associated with the network interface.
- Requester
Id string - ID of the entity that launched the instance on your behalf.
- Security
Groups List<string> - List of security groups for the network interface.
- Subnet
Id string - ID of the subnet.
- Dictionary<string, string>
- Any tags assigned to the network interface.
- Vpc
Id string - ID of the VPC.
- Filters
List<Get
Network Interface Filter>
- Arn string
- ARN of the network interface.
- Associations
[]Get
Network Interface Association - Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- Attachments
[]Get
Network Interface Attachment Type - Availability
Zone string - Availability Zone.
- Description string
- Description of the network interface.
- Id string
- Interface
Type string - Type of interface.
- Ipv6Addresses []string
- List of IPv6 addresses to assign to the ENI.
- Mac
Address string - MAC address.
- Outpost
Arn string - ARN of the Outpost.
- Owner
Id string - AWS account ID of the owner of the network interface.
- Private
Dns stringName - Private DNS name.
- Private
Ip string - Private IPv4 address of the network interface within the subnet.
- Private
Ips []string - Private IPv4 addresses associated with the network interface.
- Requester
Id string - ID of the entity that launched the instance on your behalf.
- Security
Groups []string - List of security groups for the network interface.
- Subnet
Id string - ID of the subnet.
- map[string]string
- Any tags assigned to the network interface.
- Vpc
Id string - ID of the VPC.
- Filters
[]Get
Network Interface Filter
- arn String
- ARN of the network interface.
- associations
List<Get
Network Interface Association> - Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- attachments
List<Get
Network Interface Attachment> - availability
Zone String - Availability Zone.
- description String
- Description of the network interface.
- id String
- interface
Type String - Type of interface.
- ipv6Addresses List<String>
- List of IPv6 addresses to assign to the ENI.
- mac
Address String - MAC address.
- outpost
Arn String - ARN of the Outpost.
- owner
Id String - AWS account ID of the owner of the network interface.
- private
Dns StringName - Private DNS name.
- private
Ip String - Private IPv4 address of the network interface within the subnet.
- private
Ips List<String> - Private IPv4 addresses associated with the network interface.
- requester
Id String - ID of the entity that launched the instance on your behalf.
- security
Groups List<String> - List of security groups for the network interface.
- subnet
Id String - ID of the subnet.
- Map<String,String>
- Any tags assigned to the network interface.
- vpc
Id String - ID of the VPC.
- filters
List<Get
Network Interface Filter>
- arn string
- ARN of the network interface.
- associations
Get
Network Interface Association[] - Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- attachments
Get
Network Interface Attachment[] - availability
Zone string - Availability Zone.
- description string
- Description of the network interface.
- id string
- interface
Type string - Type of interface.
- ipv6Addresses string[]
- List of IPv6 addresses to assign to the ENI.
- mac
Address string - MAC address.
- outpost
Arn string - ARN of the Outpost.
- owner
Id string - AWS account ID of the owner of the network interface.
- private
Dns stringName - Private DNS name.
- private
Ip string - Private IPv4 address of the network interface within the subnet.
- private
Ips string[] - Private IPv4 addresses associated with the network interface.
- requester
Id string - ID of the entity that launched the instance on your behalf.
- security
Groups string[] - List of security groups for the network interface.
- subnet
Id string - ID of the subnet.
- {[key: string]: string}
- Any tags assigned to the network interface.
- vpc
Id string - ID of the VPC.
- filters
Get
Network Interface Filter[]
- arn str
- ARN of the network interface.
- associations
Sequence[Get
Network Interface Association] - Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- attachments
Sequence[Get
Network Interface Attachment] - availability_
zone str - Availability Zone.
- description str
- Description of the network interface.
- id str
- interface_
type str - Type of interface.
- ipv6_
addresses Sequence[str] - List of IPv6 addresses to assign to the ENI.
- mac_
address str - MAC address.
- outpost_
arn str - ARN of the Outpost.
- owner_
id str - AWS account ID of the owner of the network interface.
- private_
dns_ strname - Private DNS name.
- private_
ip str - Private IPv4 address of the network interface within the subnet.
- private_
ips Sequence[str] - Private IPv4 addresses associated with the network interface.
- requester_
id str - ID of the entity that launched the instance on your behalf.
- security_
groups Sequence[str] - List of security groups for the network interface.
- subnet_
id str - ID of the subnet.
- Mapping[str, str]
- Any tags assigned to the network interface.
- vpc_
id str - ID of the VPC.
- filters
Sequence[Get
Network Interface Filter]
- arn String
- ARN of the network interface.
- associations List<Property Map>
- Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- attachments List<Property Map>
- availability
Zone String - Availability Zone.
- description String
- Description of the network interface.
- id String
- interface
Type String - Type of interface.
- ipv6Addresses List<String>
- List of IPv6 addresses to assign to the ENI.
- mac
Address String - MAC address.
- outpost
Arn String - ARN of the Outpost.
- owner
Id String - AWS account ID of the owner of the network interface.
- private
Dns StringName - Private DNS name.
- private
Ip String - Private IPv4 address of the network interface within the subnet.
- private
Ips List<String> - Private IPv4 addresses associated with the network interface.
- requester
Id String - ID of the entity that launched the instance on your behalf.
- security
Groups List<String> - List of security groups for the network interface.
- subnet
Id String - ID of the subnet.
- Map<String>
- Any tags assigned to the network interface.
- vpc
Id String - ID of the VPC.
- filters List<Property Map>
Supporting Types
GetNetworkInterfaceAssociation
- Allocation
Id string - Allocation ID.
- Association
Id string - Association ID.
- Carrier
Ip string - 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 stringIp - Customer-owned IP address.
- Ip
Owner stringId - ID of the Elastic IP address owner.
- Public
Dns stringName - Public DNS name.
- Public
Ip string - Address of the Elastic IP address bound to the network interface.
- Allocation
Id string - Allocation ID.
- Association
Id string - Association ID.
- Carrier
Ip string - 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 stringIp - Customer-owned IP address.
- Ip
Owner stringId - ID of the Elastic IP address owner.
- Public
Dns stringName - Public DNS name.
- Public
Ip string - Address of the Elastic IP address bound to the network interface.
- allocation
Id String - Allocation ID.
- association
Id String - Association ID.
- carrier
Ip String - 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 StringIp - Customer-owned IP address.
- ip
Owner StringId - ID of the Elastic IP address owner.
- public
Dns StringName - Public DNS name.
- public
Ip String - Address of the Elastic IP address bound to the network interface.
- allocation
Id string - Allocation ID.
- association
Id string - Association ID.
- carrier
Ip string - 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 stringIp - Customer-owned IP address.
- ip
Owner stringId - ID of the Elastic IP address owner.
- public
Dns stringName - Public DNS name.
- public
Ip string - Address of the Elastic IP address bound to the network interface.
- allocation_
id str - Allocation ID.
- association_
id str - Association ID.
- carrier_
ip str - 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_ strip - Customer-owned IP address.
- ip_
owner_ strid - ID of the Elastic IP address owner.
- public_
dns_ strname - Public DNS name.
- public_
ip str - Address of the Elastic IP address bound to the network interface.
- allocation
Id String - Allocation ID.
- association
Id String - Association ID.
- carrier
Ip String - 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 StringIp - Customer-owned IP address.
- ip
Owner StringId - ID of the Elastic IP address owner.
- public
Dns StringName - Public DNS name.
- public
Ip String - Address of the Elastic IP address bound to the network interface.
GetNetworkInterfaceAttachment
- Attachment
Id string - Device
Index int - Instance
Id string - Instance
Owner stringId
- Attachment
Id string - Device
Index int - Instance
Id string - Instance
Owner stringId
- attachment
Id String - device
Index Integer - instance
Id String - instance
Owner StringId
- attachment
Id string - device
Index number - instance
Id string - instance
Owner stringId
- attachment_
id str - device_
index int - instance_
id str - instance_
owner_ strid
- attachment
Id String - device
Index Number - instance
Id String - instance
Owner StringId
GetNetworkInterfaceFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.