GetLocalGateways

Provides information for multiple EC2 Local Gateways, such as their identifiers.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var fooLocalGateways = Output.Create(Aws.Ec2.GetLocalGateways.InvokeAsync(new Aws.Ec2.GetLocalGatewaysArgs
        {
            Tags = 
            {
                { "service", "production" },
            },
        }));
        this.Foo = fooLocalGateways.Apply(fooLocalGateways => fooLocalGateways.Ids);
    }

    [Output("foo")]
    public Output<string> Foo { get; set; }
}
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 {
        fooLocalGateways, err := ec2.GetLocalGateways(ctx, &ec2.GetLocalGatewaysArgs{
            Tags: map[string]interface{}{
                "service": "production",
            },
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("foo", fooLocalGateways.Ids)
        return nil
    })
}
import pulumi
import pulumi_aws as aws

foo_local_gateways = aws.ec2.get_local_gateways(tags={
    "service": "production",
})
pulumi.export("foo", foo_local_gateways.ids)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const fooLocalGateways = pulumi.output(aws.ec2.getLocalGateways({
    tags: {
        service: "production",
    },
}, { async: true }));

export const foo = fooLocalGateways.ids;

Using GetLocalGateways

function getLocalGateways(args: GetLocalGatewaysArgs, opts?: InvokeOptions): Promise<GetLocalGatewaysResult>
function  get_local_gateways(filters=None, tags=None, opts=None)
func GetLocalGateways(ctx *Context, args *GetLocalGatewaysArgs, opts ...InvokeOption) (*GetLocalGatewaysResult, error)
public static class GetLocalGateways {
    public static Task<GetLocalGatewaysResult> InvokeAsync(GetLocalGatewaysArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetLocalGatewaysFilterArgs>

Custom filter block as described below.

Tags Dictionary<string, string>

A mapping of tags, each pair of which must exactly match a pair on the desired local_gateways.

Filters []GetLocalGatewaysFilter

Custom filter block as described below.

Tags map[string]string

A mapping of tags, each pair of which must exactly match a pair on the desired local_gateways.

filters GetLocalGatewaysFilter[]

Custom filter block as described below.

tags {[key: string]: string}

A mapping of tags, each pair of which must exactly match a pair on the desired local_gateways.

filters List[GetLocalGatewaysFilter]

Custom filter block as described below.

tags Dict[str, str]

A mapping of tags, each pair of which must exactly match a pair on the desired local_gateways.

GetLocalGateways Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

Set of all the Local Gateway identifiers

Tags Dictionary<string, string>
Filters List<GetLocalGatewaysFilter>
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

Set of all the Local Gateway identifiers

Tags map[string]string
Filters []GetLocalGatewaysFilter
id string

The provider-assigned unique ID for this managed resource.

ids string[]

Set of all the Local Gateway identifiers

tags {[key: string]: string}
filters GetLocalGatewaysFilter[]
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

Set of all the Local Gateway identifiers

tags Dict[str, str]
filters List[GetLocalGatewaysFilter]

Supporting Types

GetLocalGatewaysFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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. A Local Gateway will be selected if any one of the given values matches.

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. A Local Gateway will be selected if any one of the given values matches.

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. A Local Gateway will be selected if any one of the given values matches.

name str

The name of the field to filter by, as defined by the underlying AWS API.

values List[str]

Set of values that are accepted for the given field. A Local Gateway will be selected if any one of the given values matches.

Package Details

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