get Network Interface
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",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
bar = aws.ec2.get_network_interface(id="eni-01234567")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
bar:
fn::invoke:
function: aws:ec2:getNetworkInterface
arguments:
id: eni-01234567
Content copied to clipboard
Return
A collection of values returned by getNetworkInterface.
Parameters
argument
A collection of arguments for invoking getNetworkInterface.
suspend fun getNetworkInterface(filters: List<GetNetworkInterfaceFilter>? = null, id: String? = null, tags: Map<String, String>? = null): GetNetworkInterfaceResult
Return
A collection of values returned by getNetworkInterface.
Parameters
filters
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
Identifier for the network interface.
tags
Any tags assigned to the network interface.
See also
suspend fun getNetworkInterface(argument: suspend GetNetworkInterfacePlainArgsBuilder.() -> Unit): GetNetworkInterfaceResult
Return
A collection of values returned by getNetworkInterface.
Parameters
argument
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetNetworkInterfacePlainArgs.