GetRouteTable
Get information on an EC2 Transit Gateway Route Table.
Example Usage
By Filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetRouteTable.InvokeAsync(new Aws.Ec2TransitGateway.GetRouteTableArgs
{
Filters =
{
new Aws.Ec2TransitGateway.Inputs.GetRouteTableFilterArgs
{
Name = "default-association-route-table",
Values =
{
"true",
},
},
new Aws.Ec2TransitGateway.Inputs.GetRouteTableFilterArgs
{
Name = "transit-gateway-id",
Values =
{
"tgw-12345678",
},
},
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2transitgateway.LookupRouteTable(ctx, &ec2transitgateway.LookupRouteTableArgs{
Filters: []ec2transitgateway.GetRouteTableFilter{
ec2transitgateway.GetRouteTableFilter{
Name: "default-association-route-table",
Values: []string{
"true",
},
},
ec2transitgateway.GetRouteTableFilter{
Name: "transit-gateway-id",
Values: []string{
"tgw-12345678",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_route_table(filters=[
{
"name": "default-association-route-table",
"values": ["true"],
},
{
"name": "transit-gateway-id",
"values": ["tgw-12345678"],
},
])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2transitgateway.getRouteTable({
filters: [
{
name: "default-association-route-table",
values: ["true"],
},
{
name: "transit-gateway-id",
values: ["tgw-12345678"],
},
],
}, { async: true }));By Identifier
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetRouteTable.InvokeAsync(new Aws.Ec2TransitGateway.GetRouteTableArgs
{
Id = "tgw-rtb-12345678",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "tgw-rtb-12345678"
_, err := ec2transitgateway.LookupRouteTable(ctx, &ec2transitgateway.LookupRouteTableArgs{
Id: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_route_table(id="tgw-rtb-12345678")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2transitgateway.getRouteTable({
id: "tgw-rtb-12345678",
}, { async: true }));Using GetRouteTable
function getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>function get_route_table(filters=None, id=None, tags=None, opts=None)func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)Note: This function is named
LookupRouteTablein the Go SDK.
public static class GetRouteTable {
public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Route Table Filter Args> One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway Route Table.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Route Table
- Filters
[]Get
Route Table Filter One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway Route Table.
- map[string]string
Key-value tags for the EC2 Transit Gateway Route Table
- filters
Get
Route Table Filter[] One or more configuration blocks containing name-values filters. Detailed below.
- id string
Identifier of the EC2 Transit Gateway Route Table.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Route Table
- filters
List[Get
Route Table Filter] One or more configuration blocks containing name-values filters. Detailed below.
- id str
Identifier of the EC2 Transit Gateway Route Table.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway Route Table
GetRouteTable Result
The following output properties are available:
- Default
Association boolRoute Table Boolean whether this is the default association route table for the EC2 Transit Gateway
- Default
Propagation boolRoute Table Boolean whether this is the default propagation route table for the EC2 Transit Gateway
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Route Table
- Transit
Gateway stringId EC2 Transit Gateway identifier
- Filters
List<Get
Route Table Filter> - Id string
EC2 Transit Gateway Route Table identifier
- Default
Association boolRoute Table Boolean whether this is the default association route table for the EC2 Transit Gateway
- Default
Propagation boolRoute Table Boolean whether this is the default propagation route table for the EC2 Transit Gateway
- map[string]string
Key-value tags for the EC2 Transit Gateway Route Table
- Transit
Gateway stringId EC2 Transit Gateway identifier
- Filters
[]Get
Route Table Filter - Id string
EC2 Transit Gateway Route Table identifier
- default
Association booleanRoute Table Boolean whether this is the default association route table for the EC2 Transit Gateway
- default
Propagation booleanRoute Table Boolean whether this is the default propagation route table for the EC2 Transit Gateway
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Route Table
- transit
Gateway stringId EC2 Transit Gateway identifier
- filters
Get
Route Table Filter[] - id string
EC2 Transit Gateway Route Table identifier
- default_
association_ boolroute_ table Boolean whether this is the default association route table for the EC2 Transit Gateway
- default_
propagation_ boolroute_ table Boolean whether this is the default propagation route table for the EC2 Transit Gateway
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway Route Table
- transit_
gateway_ strid EC2 Transit Gateway identifier
- filters
List[Get
Route Table Filter] - id str
EC2 Transit Gateway Route Table identifier
Supporting Types
GetRouteTableFilter
- Name string
Name of the filter.
- Values List<string>
List of one or more values for the filter.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.