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
LookupNetworkInterfacein the Go SDK.
public static class GetNetworkInterface {
public static Task<GetNetworkInterfaceResult> InvokeAsync(GetNetworkInterfaceArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Network Interface Filter Args> 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
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
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 str
The identifier for the network interface.
- Dict[str, str]
Any tags assigned to the network interface.
GetNetworkInterface Result
The following output properties are available:
- 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.
- Dictionary<string, string>
Any tags assigned to the network interface.
- Vpc
Id string The ID of the VPC.
- Filters
List<Get
Network Interface Filter>
- 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
- 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[]
- 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 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_ strname 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.
- Dict[str, str]
Any tags assigned to the network interface.
- vpc_
id str The ID of the VPC.
- filters
List[Get
Network Interface Filter]
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.
- Allocation
Id string The allocation ID.
- Association
Id string The association ID.
- 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.
- 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.
- 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.
- 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.
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.
GetNetworkInterfaceFilter
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.