Try AWS Native preview for resources not in the classic version.
aws.ec2transitgateway.getRouteTableRoutes
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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<Get
Route Table Routes Filter> - Custom filter block as described below.
- Transit
Gateway stringRoute Table Id 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
[]Get
Route Table Routes Filter - Custom filter block as described below.
- Transit
Gateway stringRoute Table Id 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<Get
Route Table Routes Filter> - Custom filter block as described below.
- transit
Gateway StringRoute Table Id 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
Get
Route Table Routes Filter[] - Custom filter block as described below.
- transit
Gateway stringRoute Table Id 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[Get
Route 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
filter
sub-blocks, which take the following arguments:
- filters List<Property Map>
- Custom filter block as described below.
- transit
Gateway StringRoute Table Id 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<Get
Route Table Routes Filter> - Id string
- The provider-assigned unique ID for this managed resource.
- Routes
List<Get
Route Table Routes Route> - List of Transit Gateway Routes.
- Transit
Gateway stringRoute Table Id
- Filters
[]Get
Route Table Routes Filter - Id string
- The provider-assigned unique ID for this managed resource.
- Routes
[]Get
Route Table Routes Route - List of Transit Gateway Routes.
- Transit
Gateway stringRoute Table Id
- filters
List<Get
Route Table Routes Filter> - id String
- The provider-assigned unique ID for this managed resource.
- routes
List<Get
Route Table Routes Route> - List of Transit Gateway Routes.
- transit
Gateway StringRoute Table Id
- filters
Get
Route Table Routes Filter[] - id string
- The provider-assigned unique ID for this managed resource.
- routes
Get
Route Table Routes Route[] - List of Transit Gateway Routes.
- transit
Gateway stringRoute Table Id
- filters
Sequence[Get
Route Table Routes Filter] - id str
- The provider-assigned unique ID for this managed resource.
- routes
Sequence[Get
Route 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.
- transit
Gateway 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
- Destination
Cidr stringBlock - The CIDR used for route destination matches.
- Prefix
List 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
. - Transit
Gateway 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
propagated
orstatic
.
- Destination
Cidr stringBlock - The CIDR used for route destination matches.
- Prefix
List 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
. - Transit
Gateway 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
propagated
orstatic
.
- destination
Cidr StringBlock - The CIDR used for route destination matches.
- prefix
List 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
. - transit
Gateway 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
propagated
orstatic
.
- destination
Cidr stringBlock - The CIDR used for route destination matches.
- prefix
List 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
. - transit
Gateway 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
propagated
orstatic
.
- 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
propagated
orstatic
.
- destination
Cidr StringBlock - The CIDR used for route destination matches.
- prefix
List 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
. - transit
Gateway 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
propagated
orstatic
.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.