AWS Classic
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. 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
The 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
The 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
The 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
The 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
The 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
The identifier for the network interface.
- 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. Get Network Interface Association> The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
- Attachments
List<Pulumi.
Aws. Ec2. Outputs. Get Network Interface Attachment> - Availability
Zone string The Availability Zone.
- Description string
Description of the network interface.
- Id string
- Interface
Type string The type of interface.
- Ipv6Addresses List<string>
List of IPv6 addresses to assign to the ENI.
- Mac
Address string The MAC address.
- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Owner
Id string The AWS account ID of the owner of the network interface.
- Private
Dns stringName The private DNS name.
- Private
Ip string The private IPv4 address of the network interface within the subnet.
- Private
Ips List<string> The private IPv4 addresses associated with the network interface.
- Requester
Id string The ID of the entity that launched the instance on your behalf.
- Security
Groups List<string> The list of security groups for the network interface.
- Subnet
Id string The ID of the subnet.
- Dictionary<string, string>
Any tags assigned to the network interface.
- Vpc
Id string The ID of the VPC.
- Filters
List<Pulumi.
Aws. Ec2. Outputs. Get Network Interface Filter>
- Arn string
The ARN of the network interface.
- Associations
[]Get
Network Interface Association The 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 The Availability Zone.
- Description string
Description of the network interface.
- Id string
- Interface
Type string The type of interface.
- Ipv6Addresses []string
List of IPv6 addresses to assign to the ENI.
- Mac
Address string The MAC address.
- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Owner
Id string The AWS account ID of the owner of the network interface.
- Private
Dns stringName The private DNS name.
- Private
Ip string The private IPv4 address of the network interface within the subnet.
- Private
Ips []string The private IPv4 addresses associated with the network interface.
- Requester
Id string The ID of the entity that launched the instance on your behalf.
- Security
Groups []string The list of security groups for the network interface.
- Subnet
Id string The ID of the subnet.
- map[string]string
Any tags assigned to the network interface.
- Vpc
Id string The ID of the VPC.
- Filters
[]Get
Network Interface Filter
- arn String
The ARN of the network interface.
- associations
List<Get
Network Interface Association> The 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 The Availability Zone.
- description String
Description of the network interface.
- id String
- interface
Type String The type of interface.
- ipv6Addresses List<String>
List of IPv6 addresses to assign to the ENI.
- mac
Address String The MAC address.
- outpost
Arn String The Amazon Resource Name (ARN) of the Outpost.
- owner
Id String The AWS account ID of the owner of the network interface.
- private
Dns StringName The private DNS name.
- private
Ip String The private IPv4 address of the network interface within the subnet.
- private
Ips List<String> The private IPv4 addresses associated with the network interface.
- requester
Id String The ID of the entity that launched the instance on your behalf.
- security
Groups List<String> The list of security groups for the network interface.
- subnet
Id String The ID of the subnet.
- Map<String,String>
Any tags assigned to the network interface.
- vpc
Id String The ID of the VPC.
- filters
List<Get
Network Interface Filter>
- arn string
The ARN of the network interface.
- associations
Get
Network Interface Association[] The 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 The Availability Zone.
- description string
Description of the network interface.
- id string
- interface
Type string The type of interface.
- ipv6Addresses string[]
List of IPv6 addresses to assign to the ENI.
- mac
Address string The MAC address.
- outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- owner
Id string The AWS account ID of the owner of the network interface.
- private
Dns stringName The private DNS name.
- private
Ip string The private IPv4 address of the network interface within the subnet.
- private
Ips string[] The private IPv4 addresses associated with the network interface.
- requester
Id string The ID of the entity that launched the instance on your behalf.
- security
Groups string[] The list of security groups for the network interface.
- subnet
Id string The ID of the subnet.
- {[key: string]: string}
Any tags assigned to the network interface.
- vpc
Id string The ID of the VPC.
- filters
Get
Network Interface Filter[]
- arn str
The ARN of the network interface.
- associations
Sequence[Get
Network Interface Association] The 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 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_ strname 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.
- Mapping[str, str]
Any tags assigned to the network interface.
- vpc_
id str The ID of the VPC.
- filters
Sequence[Get
Network Interface Filter]
- 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>
- availability
Zone String The Availability Zone.
- description String
Description of the network interface.
- id String
- interface
Type String The type of interface.
- ipv6Addresses List<String>
List of IPv6 addresses to assign to the ENI.
- mac
Address String The MAC address.
- outpost
Arn String The Amazon Resource Name (ARN) of the Outpost.
- owner
Id String The AWS account ID of the owner of the network interface.
- private
Dns StringName The private DNS name.
- private
Ip String The private IPv4 address of the network interface within the subnet.
- private
Ips List<String> The private IPv4 addresses associated with the network interface.
- requester
Id String The ID of the entity that launched the instance on your behalf.
- security
Groups List<String> The list of security groups for the network interface.
- subnet
Id String The ID of the subnet.
- Map<String>
Any tags assigned to the network interface.
- vpc
Id String The ID of the VPC.
- filters List<Property Map>
Supporting Types
GetNetworkInterfaceAssociation
- Allocation
Id string The allocation ID.
- Association
Id string The association ID.
- Carrier
Ip 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.
- Customer
Owned stringIp The customer-owned IP address.
- Ip
Owner stringId The ID of the Elastic IP address owner.
- Public
Dns stringName The public DNS name.
- Public
Ip string The address of the Elastic IP address bound to the network interface.
- Allocation
Id string The allocation ID.
- Association
Id string The association ID.
- Carrier
Ip 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.
- Customer
Owned stringIp The customer-owned IP address.
- Ip
Owner stringId The ID of the Elastic IP address owner.
- Public
Dns stringName The public DNS name.
- Public
Ip string The address of the Elastic IP address bound to the network interface.
- allocation
Id String The allocation ID.
- association
Id String The association ID.
- carrier
Ip 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.
- customer
Owned StringIp The customer-owned IP address.
- ip
Owner StringId The ID of the Elastic IP address owner.
- public
Dns StringName The public DNS name.
- public
Ip String The address of the Elastic IP address bound to the network interface.
- allocation
Id string The allocation ID.
- association
Id string The association ID.
- carrier
Ip 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.
- customer
Owned stringIp The customer-owned IP address.
- ip
Owner stringId The ID of the Elastic IP address owner.
- public
Dns stringName The public DNS name.
- public
Ip 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_ strip The customer-owned IP address.
- ip_
owner_ strid The ID of the Elastic IP address owner.
- public_
dns_ strname The public DNS name.
- public_
ip str The address of the Elastic IP address bound to the network interface.
- allocation
Id String The allocation ID.
- association
Id String The association ID.
- carrier
Ip 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.
- customer
Owned StringIp The customer-owned IP address.
- ip
Owner StringId The ID of the Elastic IP address owner.
- public
Dns StringName The public DNS name.
- public
Ip String The 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
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.