1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. getRouteTableRoutes
AWS v6.58.0 published on Wednesday, Nov 6, 2024 by Pulumi

aws.ec2transitgateway.getRouteTableRoutes

Explore with Pulumi AI

aws logo
AWS v6.58.0 published on Wednesday, Nov 6, 2024 by Pulumi

    Provides informations for routes of a specific transit gateway, such as state, type, cidr

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.ec2transitgateway.getRouteTableRoutes({
        filters: [{
            name: "type",
            values: ["propagated"],
        }],
        transitGatewayRouteTableId: example.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.ec2transitgateway.get_route_table_routes(filters=[{
            "name": "type",
            "values": ["propagated"],
        }],
        transit_gateway_route_table_id=example["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.GetRouteTableRoutes(ctx, &ec2transitgateway.GetRouteTableRoutesArgs{
    			Filters: []ec2transitgateway.GetRouteTableRoutesFilter{
    				{
    					Name: "type",
    					Values: []string{
    						"propagated",
    					},
    				},
    			},
    			TransitGatewayRouteTableId: example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Aws.Ec2TransitGateway.GetRouteTableRoutes.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ec2TransitGateway.Inputs.GetRouteTableRoutesFilterInputArgs
                {
                    Name = "type",
                    Values = new[]
                    {
                        "propagated",
                    },
                },
            },
            TransitGatewayRouteTableId = example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
    import com.pulumi.aws.ec2transitgateway.inputs.GetRouteTableRoutesArgs;
    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 test = Ec2transitgatewayFunctions.getRouteTableRoutes(GetRouteTableRoutesArgs.builder()
                .filters(GetRouteTableRoutesFilterArgs.builder()
                    .name("type")
                    .values("propagated")
                    .build())
                .transitGatewayRouteTableId(example.id())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:ec2transitgateway:getRouteTableRoutes
          Arguments:
            filters:
              - name: type
                values:
                  - propagated
            transitGatewayRouteTableId: ${example.id}
    

    Using getRouteTableRoutes

    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 getRouteTableRoutes(args: GetRouteTableRoutesArgs, opts?: InvokeOptions): Promise<GetRouteTableRoutesResult>
    function getRouteTableRoutesOutput(args: GetRouteTableRoutesOutputArgs, opts?: InvokeOptions): Output<GetRouteTableRoutesResult>
    def get_route_table_routes(filters: Optional[Sequence[GetRouteTableRoutesFilter]] = None,
                               transit_gateway_route_table_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetRouteTableRoutesResult
    def get_route_table_routes_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRouteTableRoutesFilterArgs]]]] = None,
                               transit_gateway_route_table_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetRouteTableRoutesResult]
    func GetRouteTableRoutes(ctx *Context, args *GetRouteTableRoutesArgs, opts ...InvokeOption) (*GetRouteTableRoutesResult, error)
    func GetRouteTableRoutesOutput(ctx *Context, args *GetRouteTableRoutesOutputArgs, opts ...InvokeOption) GetRouteTableRoutesResultOutput

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

    public static class GetRouteTableRoutes 
    {
        public static Task<GetRouteTableRoutesResult> InvokeAsync(GetRouteTableRoutesArgs args, InvokeOptions? opts = null)
        public static Output<GetRouteTableRoutesResult> Invoke(GetRouteTableRoutesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRouteTableRoutesResult> getRouteTableRoutes(GetRouteTableRoutesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ec2transitgateway/getRouteTableRoutes:getRouteTableRoutes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetRouteTableRoutesFilter>
    Custom filter block as described below.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

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

    Filters []GetRouteTableRoutesFilter
    Custom filter block as described below.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

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

    filters List<GetRouteTableRoutesFilter>
    Custom filter block as described below.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

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

    filters GetRouteTableRoutesFilter[]
    Custom filter block as described below.
    transitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

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

    filters Sequence[GetRouteTableRoutesFilter]
    Custom filter block as described below.
    transit_gateway_route_table_id str

    Identifier of EC2 Transit Gateway Route Table.

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

    filters List<Property Map>
    Custom filter block as described below.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

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

    getRouteTableRoutes Result

    The following output properties are available:

    Filters List<GetRouteTableRoutesFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    Routes List<GetRouteTableRoutesRoute>
    List of Transit Gateway Routes.
    TransitGatewayRouteTableId string
    Filters []GetRouteTableRoutesFilter
    Id string
    The provider-assigned unique ID for this managed resource.
    Routes []GetRouteTableRoutesRoute
    List of Transit Gateway Routes.
    TransitGatewayRouteTableId string
    filters List<GetRouteTableRoutesFilter>
    id String
    The provider-assigned unique ID for this managed resource.
    routes List<GetRouteTableRoutesRoute>
    List of Transit Gateway Routes.
    transitGatewayRouteTableId String
    filters GetRouteTableRoutesFilter[]
    id string
    The provider-assigned unique ID for this managed resource.
    routes GetRouteTableRoutesRoute[]
    List of Transit Gateway Routes.
    transitGatewayRouteTableId string
    filters Sequence[GetRouteTableRoutesFilter]
    id str
    The provider-assigned unique ID for this managed resource.
    routes Sequence[GetRouteTableRoutesRoute]
    List of Transit Gateway Routes.
    transit_gateway_route_table_id str
    filters List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    routes List<Property Map>
    List of Transit Gateway Routes.
    transitGatewayRouteTableId String

    Supporting Types

    GetRouteTableRoutesFilter

    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.
    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.
    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.
    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.
    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.
    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.

    GetRouteTableRoutesRoute

    DestinationCidrBlock string
    The CIDR used for route destination matches.
    PrefixListId string
    The ID of the prefix list used for destination matches.
    State string
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    TransitGatewayRouteTableAnnouncementId string
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    Type string
    The type of the route, can be propagated or static.
    DestinationCidrBlock string
    The CIDR used for route destination matches.
    PrefixListId string
    The ID of the prefix list used for destination matches.
    State string
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    TransitGatewayRouteTableAnnouncementId string
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    Type string
    The type of the route, can be propagated or static.
    destinationCidrBlock String
    The CIDR used for route destination matches.
    prefixListId String
    The ID of the prefix list used for destination matches.
    state String
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    transitGatewayRouteTableAnnouncementId String
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    type String
    The type of the route, can be propagated or static.
    destinationCidrBlock string
    The CIDR used for route destination matches.
    prefixListId string
    The ID of the prefix list used for destination matches.
    state string
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    transitGatewayRouteTableAnnouncementId string
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    type string
    The type of the route, can be propagated or static.
    destination_cidr_block str
    The CIDR used for route destination matches.
    prefix_list_id str
    The ID of the prefix list used for destination matches.
    state str
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    transit_gateway_route_table_announcement_id str
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    type str
    The type of the route, can be propagated or static.
    destinationCidrBlock String
    The CIDR used for route destination matches.
    prefixListId String
    The ID of the prefix list used for destination matches.
    state String
    The current state of the route, can be active, deleted, pending, blackhole, deleting.
    transitGatewayRouteTableAnnouncementId String
    The id of the transit gateway route table announcement, most of the time it is an empty string.
    type String
    The type of the route, can be propagated or static.

    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.58.0 published on Wednesday, Nov 6, 2024 by Pulumi