AWS Classic
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/v5/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
})
}
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 exampleNetworkInterfaces = Output.of(Ec2Functions.getNetworkInterfaces());
ctx.export("example", exampleNetworkInterfaces.apply(getNetworkInterfacesResult -> getNetworkInterfacesResult.ids()));
}
}
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);
variables:
exampleNetworkInterfaces:
Fn::Invoke:
Function: aws:ec2:getNetworkInterfaces
Arguments: {}
outputs:
example: ${exampleNetworkInterfaces.ids}
Using getNetworkInterfaces
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 getNetworkInterfaces(args: GetNetworkInterfacesArgs, opts?: InvokeOptions): Promise<GetNetworkInterfacesResult>
function getNetworkInterfacesOutput(args: GetNetworkInterfacesOutputArgs, opts?: InvokeOptions): Output<GetNetworkInterfacesResult>
def get_network_interfaces(filters: Optional[Sequence[GetNetworkInterfacesFilter]] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkInterfacesResult
def get_network_interfaces_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkInterfacesFilterArgs]]]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkInterfacesResult]
func GetNetworkInterfaces(ctx *Context, args *GetNetworkInterfacesArgs, opts ...InvokeOption) (*GetNetworkInterfacesResult, error)
func GetNetworkInterfacesOutput(ctx *Context, args *GetNetworkInterfacesOutputArgs, opts ...InvokeOption) GetNetworkInterfacesResultOutput
> Note: This function is named GetNetworkInterfaces
in the Go SDK.
public static class GetNetworkInterfaces
{
public static Task<GetNetworkInterfacesResult> InvokeAsync(GetNetworkInterfacesArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkInterfacesResult> Invoke(GetNetworkInterfacesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkInterfacesResult> getNetworkInterfaces(GetNetworkInterfacesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:ec2/getNetworkInterfaces:getNetworkInterfaces
Arguments:
# Arguments dictionary
The following arguments are supported:
- Filters
List<Pulumi.
Aws. Ec2. Inputs. Get Network Interfaces Filter> Custom filter block as described below.
- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
- Filters
[]Get
Network Interfaces Filter Custom filter block as described below.
- map[string]string
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
- filters
List<Get
Network Interfaces Filter> Custom filter block as described below.
- Map<String,String>
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
- filters
Get
Network Interfaces Filter[] Custom filter block as described below.
- {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
- filters
Sequence[Get
Network Interfaces Filter] Custom filter block as described below.
- Mapping[str, str]
A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
- filters List<Property Map>
Custom filter block as described below.
- Map<String>
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.
- Dictionary<string, string>
- Filters
List<Pulumi.
Aws. Ec2. Outputs. Get Network Interfaces Filter>
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of all the network interface ids found.
- map[string]string
- Filters
[]Get
Network Interfaces Filter
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of all the network interface ids found.
- Map<String,String>
- filters
List<Get
Network Interfaces Filter>
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of all the network interface ids found.
- {[key: string]: string}
- filters
Get
Network Interfaces Filter[]
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
A list of all the network interface ids found.
- Mapping[str, str]
- filters
Sequence[Get
Network Interfaces Filter]
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of all the network interface ids found.
- Map<String>
- filters List<Property Map>
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 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 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.
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.