1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. getLocalGatewayRouteTables
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2.getLocalGatewayRouteTables

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides information for multiple EC2 Local Gateway Route Tables, such as their identifiers.

    Example Usage

    The following shows outputting all Local Gateway Route Table Ids.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    export = async () => {
        const foo = await aws.ec2.getLocalGatewayRouteTables({});
        return {
            foo: foo.ids,
        };
    }
    
    import pulumi
    import pulumi_aws as aws
    
    foo = aws.ec2.get_local_gateway_route_tables()
    pulumi.export("foo", foo.ids)
    
    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 {
    		foo, err := ec2.GetLocalGatewayRouteTables(ctx, &ec2.GetLocalGatewayRouteTablesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("foo", foo.Ids)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Aws.Ec2.GetLocalGatewayRouteTables.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["foo"] = foo.Apply(getLocalGatewayRouteTablesResult => getLocalGatewayRouteTablesResult.Ids),
        };
    });
    
    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.GetLocalGatewayRouteTablesArgs;
    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 foo = Ec2Functions.getLocalGatewayRouteTables();
    
            ctx.export("foo", foo.applyValue(getLocalGatewayRouteTablesResult -> getLocalGatewayRouteTablesResult.ids()));
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: aws:ec2:getLocalGatewayRouteTables
          Arguments: {}
    outputs:
      foo: ${foo.ids}
    

    Using getLocalGatewayRouteTables

    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 getLocalGatewayRouteTables(args: GetLocalGatewayRouteTablesArgs, opts?: InvokeOptions): Promise<GetLocalGatewayRouteTablesResult>
    function getLocalGatewayRouteTablesOutput(args: GetLocalGatewayRouteTablesOutputArgs, opts?: InvokeOptions): Output<GetLocalGatewayRouteTablesResult>
    def get_local_gateway_route_tables(filters: Optional[Sequence[GetLocalGatewayRouteTablesFilter]] = None,
                                       tags: Optional[Mapping[str, str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetLocalGatewayRouteTablesResult
    def get_local_gateway_route_tables_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetLocalGatewayRouteTablesFilterArgs]]]] = None,
                                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetLocalGatewayRouteTablesResult]
    func GetLocalGatewayRouteTables(ctx *Context, args *GetLocalGatewayRouteTablesArgs, opts ...InvokeOption) (*GetLocalGatewayRouteTablesResult, error)
    func GetLocalGatewayRouteTablesOutput(ctx *Context, args *GetLocalGatewayRouteTablesOutputArgs, opts ...InvokeOption) GetLocalGatewayRouteTablesResultOutput

    > Note: This function is named GetLocalGatewayRouteTables in the Go SDK.

    public static class GetLocalGatewayRouteTables 
    {
        public static Task<GetLocalGatewayRouteTablesResult> InvokeAsync(GetLocalGatewayRouteTablesArgs args, InvokeOptions? opts = null)
        public static Output<GetLocalGatewayRouteTablesResult> Invoke(GetLocalGatewayRouteTablesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLocalGatewayRouteTablesResult> getLocalGatewayRouteTables(GetLocalGatewayRouteTablesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ec2/getLocalGatewayRouteTables:getLocalGatewayRouteTables
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetLocalGatewayRouteTablesFilter>

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    Tags Dictionary<string, string>
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
    Filters []GetLocalGatewayRouteTablesFilter

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    Tags map[string]string
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
    filters List<GetLocalGatewayRouteTablesFilter>

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    tags Map<String,String>
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
    filters GetLocalGatewayRouteTablesFilter[]

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    tags {[key: string]: string}
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
    filters Sequence[GetLocalGatewayRouteTablesFilter]

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    tags Mapping[str, str]
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
    filters List<Property Map>

    Custom filter block as described below.

    More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

    tags Map<String>
    Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.

    getLocalGatewayRouteTables Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Set of Local Gateway Route Table identifiers
    Tags Dictionary<string, string>
    Filters List<GetLocalGatewayRouteTablesFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Set of Local Gateway Route Table identifiers
    Tags map[string]string
    Filters []GetLocalGatewayRouteTablesFilter
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    Set of Local Gateway Route Table identifiers
    tags Map<String,String>
    filters List<GetLocalGatewayRouteTablesFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    Set of Local Gateway Route Table identifiers
    tags {[key: string]: string}
    filters GetLocalGatewayRouteTablesFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    Set of Local Gateway Route Table identifiers
    tags Mapping[str, str]
    filters Sequence[GetLocalGatewayRouteTablesFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    Set of Local Gateway Route Table identifiers
    tags Map<String>
    filters List<Property Map>

    Supporting Types

    GetLocalGatewayRouteTablesFilter

    Name string
    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 Route Table will be selected if any one of the given values matches.
    Name string
    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 Route Table will be selected if any one of the given values matches.
    name String
    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 Route Table will be selected if any one of the given values matches.
    name string
    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 Route Table will be selected if any one of the given values matches.
    name str
    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. A Local Gateway Route Table will be selected if any one of the given values matches.
    name String
    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 Route Table will be selected if any one of the given values matches.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi