aws.ec2transitgateway.getRouteTableRoutes
Explore with Pulumi AI
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)
public static Output<GetRouteTableRoutesResult> getRouteTableRoutes(GetRouteTableRoutesArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ec2transitgateway/getRouteTableRoutes:getRouteTableRoutes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetRoute Table Routes Filter> 
- Custom filter block as described below.
- TransitGateway stringRoute Table Id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- Filters
[]GetRoute Table Routes Filter 
- Custom filter block as described below.
- TransitGateway stringRoute Table Id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
List<GetRoute Table Routes Filter> 
- Custom filter block as described below.
- transitGateway StringRoute Table Id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
GetRoute Table Routes Filter[] 
- Custom filter block as described below.
- transitGateway stringRoute Table Id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
Sequence[GetRoute Table Routes Filter] 
- Custom filter block as described below.
- transit_gateway_ strroute_ table_ id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters List<Property Map>
- Custom filter block as described below.
- transitGateway StringRoute Table Id 
- Identifier of EC2 Transit Gateway Route Table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
getRouteTableRoutes Result
The following output properties are available:
- Filters
List<GetRoute Table Routes Filter> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Routes
List<GetRoute Table Routes Route> 
- List of Transit Gateway Routes.
- TransitGateway stringRoute Table Id 
- Filters
[]GetRoute Table Routes Filter 
- Id string
- The provider-assigned unique ID for this managed resource.
- Routes
[]GetRoute Table Routes Route 
- List of Transit Gateway Routes.
- TransitGateway stringRoute Table Id 
- filters
List<GetRoute Table Routes Filter> 
- id String
- The provider-assigned unique ID for this managed resource.
- routes
List<GetRoute Table Routes Route> 
- List of Transit Gateway Routes.
- transitGateway StringRoute Table Id 
- filters
GetRoute Table Routes Filter[] 
- id string
- The provider-assigned unique ID for this managed resource.
- routes
GetRoute Table Routes Route[] 
- List of Transit Gateway Routes.
- transitGateway stringRoute Table Id 
- filters
Sequence[GetRoute Table Routes Filter] 
- id str
- The provider-assigned unique ID for this managed resource.
- routes
Sequence[GetRoute Table Routes Route] 
- List of Transit Gateway Routes.
- transit_gateway_ strroute_ table_ id 
- filters List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- routes List<Property Map>
- List of Transit Gateway Routes.
- transitGateway StringRoute Table Id 
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    
- DestinationCidr stringBlock 
- The CIDR used for route destination matches.
- PrefixList stringId 
- 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.
- TransitGateway stringRoute Table Announcement Id 
- 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 propagatedorstatic.
- DestinationCidr stringBlock 
- The CIDR used for route destination matches.
- PrefixList stringId 
- 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.
- TransitGateway stringRoute Table Announcement Id 
- 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 propagatedorstatic.
- destinationCidr StringBlock 
- The CIDR used for route destination matches.
- prefixList StringId 
- 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.
- transitGateway StringRoute Table Announcement Id 
- 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 propagatedorstatic.
- destinationCidr stringBlock 
- The CIDR used for route destination matches.
- prefixList stringId 
- 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.
- transitGateway stringRoute Table Announcement Id 
- 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 propagatedorstatic.
- destination_cidr_ strblock 
- The CIDR used for route destination matches.
- prefix_list_ strid 
- 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_ strroute_ table_ announcement_ id 
- 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 propagatedorstatic.
- destinationCidr StringBlock 
- The CIDR used for route destination matches.
- prefixList StringId 
- 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.
- transitGateway StringRoute Table Announcement Id 
- 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 propagatedorstatic.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.