getNetworkInterfaces

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleNetworkInterfaces = Output.Create(Aws.Ec2.GetNetworkInterfaces.InvokeAsync());
        this.Example = exampleNetworkInterfaces.Apply(exampleNetworkInterfaces => exampleNetworkInterfaces.Ids);
    }

    [Output("example")]
    public Output<string> Example { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleNetworkInterfaces, err := ec2.GetNetworkInterfaces(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("example", exampleNetworkInterfaces.Ids)
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example_network_interfaces = aws.ec2.get_network_interfaces()
pulumi.export("example", example_network_interfaces.ids)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleNetworkInterfaces = aws.ec2.getNetworkInterfaces({});
export const example = exampleNetworkInterfaces.then(exampleNetworkInterfaces => exampleNetworkInterfaces.ids);

Using getNetworkInterfaces

function getNetworkInterfaces(args: GetNetworkInterfacesArgs, opts?: InvokeOptions): Promise<GetNetworkInterfacesResult>
def get_network_interfaces(filters: Optional[Sequence[GetNetworkInterfacesFilter]] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetNetworkInterfacesResult
func GetNetworkInterfaces(ctx *Context, args *GetNetworkInterfacesArgs, opts ...InvokeOption) (*GetNetworkInterfacesResult, error)

Note: This function is named GetNetworkInterfaces in the Go SDK.

public static class GetNetworkInterfaces {
    public static Task<GetNetworkInterfacesResult> InvokeAsync(GetNetworkInterfacesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetNetworkInterfacesFilter>
Custom filter block as described below.
Tags Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
Filters []GetNetworkInterfacesFilter
Custom filter block as described below.
Tags map[string]string
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
filters GetNetworkInterfacesFilter[]
Custom filter block as described below.
tags {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
filters Sequence[GetNetworkInterfacesFilter]
Custom filter block as described below.
tags Mapping[str, str]
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.

getNetworkInterfaces Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of all the network interface ids found. This data source will fail if none are found.
Tags Dictionary<string, string>
Filters List<GetNetworkInterfacesFilter>
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of all the network interface ids found. This data source will fail if none are found.
Tags map[string]string
Filters []GetNetworkInterfacesFilter
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of all the network interface ids found. This data source will fail if none are found.
tags {[key: string]: string}
filters GetNetworkInterfacesFilter[]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of all the network interface ids found. This data source will fail if none are found.
tags Mapping[str, str]
filters Sequence[GetNetworkInterfacesFilter]

Supporting Types

GetNetworkInterfacesFilter

Name string
The name of the field to filter by, as defined by the underlying AWS API.
Values List<string>
Set of values that are accepted for the given field.
Name string
The name of the field to filter by, as defined by the underlying AWS API.
Values []string
Set of values that are accepted for the given field.
name string
The name of the field to filter by, as defined by the underlying AWS API.
values string[]
Set of values that are accepted for the given field.
name str
The name of the field to filter by, as defined by the underlying AWS API.
values Sequence[str]
Set of values that are accepted for the given field.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.