aws.ec2transitgateway.getRouteTableAssociations
Explore with Pulumi AI
Provides information for multiple EC2 Transit Gateway Route Table Associations, such as their identifiers.
Example Usage
By Transit Gateway Identifier
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getRouteTableAssociations({
transitGatewayRouteTableId: exampleAwsEc2TransitGatewayRouteTable.id,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_route_table_associations(transit_gateway_route_table_id=example_aws_ec2_transit_gateway_route_table["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.GetRouteTableAssociations(ctx, &ec2transitgateway.GetRouteTableAssociationsArgs{
TransitGatewayRouteTableId: exampleAwsEc2TransitGatewayRouteTable.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 example = Aws.Ec2TransitGateway.GetRouteTableAssociations.Invoke(new()
{
TransitGatewayRouteTableId = exampleAwsEc2TransitGatewayRouteTable.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.GetRouteTableAssociationsArgs;
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 example = Ec2transitgatewayFunctions.getRouteTableAssociations(GetRouteTableAssociationsArgs.builder()
.transitGatewayRouteTableId(exampleAwsEc2TransitGatewayRouteTable.id())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2transitgateway:getRouteTableAssociations
Arguments:
transitGatewayRouteTableId: ${exampleAwsEc2TransitGatewayRouteTable.id}
Using getRouteTableAssociations
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 getRouteTableAssociations(args: GetRouteTableAssociationsArgs, opts?: InvokeOptions): Promise<GetRouteTableAssociationsResult>
function getRouteTableAssociationsOutput(args: GetRouteTableAssociationsOutputArgs, opts?: InvokeOptions): Output<GetRouteTableAssociationsResult>
def get_route_table_associations(filters: Optional[Sequence[GetRouteTableAssociationsFilter]] = None,
transit_gateway_route_table_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRouteTableAssociationsResult
def get_route_table_associations_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRouteTableAssociationsFilterArgs]]]] = None,
transit_gateway_route_table_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRouteTableAssociationsResult]
func GetRouteTableAssociations(ctx *Context, args *GetRouteTableAssociationsArgs, opts ...InvokeOption) (*GetRouteTableAssociationsResult, error)
func GetRouteTableAssociationsOutput(ctx *Context, args *GetRouteTableAssociationsOutputArgs, opts ...InvokeOption) GetRouteTableAssociationsResultOutput
> Note: This function is named GetRouteTableAssociations
in the Go SDK.
public static class GetRouteTableAssociations
{
public static Task<GetRouteTableAssociationsResult> InvokeAsync(GetRouteTableAssociationsArgs args, InvokeOptions? opts = null)
public static Output<GetRouteTableAssociationsResult> Invoke(GetRouteTableAssociationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouteTableAssociationsResult> getRouteTableAssociations(GetRouteTableAssociationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2transitgateway/getRouteTableAssociations:getRouteTableAssociations
arguments:
# arguments dictionary
The following arguments are supported:
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- Filters
List<Get
Route Table Associations Filter> Custom filter block as described below.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- Filters
[]Get
Route Table Associations Filter Custom filter block as described below.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- transit
Gateway StringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- filters
List<Get
Route Table Associations Filter> Custom filter block as described below.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- filters
Get
Route Table Associations Filter[] Custom filter block as described below.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- transit_
gateway_ strroute_ table_ id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- filters
Sequence[Get
Route Table Associations Filter] Custom filter block as described below.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- transit
Gateway StringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
The following arguments are optional:
- 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:
getRouteTableAssociations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Set of Transit Gateway Route Table Association identifiers.
- Transit
Gateway stringRoute Table Id - Filters
List<Get
Route Table Associations Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Set of Transit Gateway Route Table Association identifiers.
- Transit
Gateway stringRoute Table Id - Filters
[]Get
Route Table Associations Filter
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- Set of Transit Gateway Route Table Association identifiers.
- transit
Gateway StringRoute Table Id - filters
List<Get
Route Table Associations Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- Set of Transit Gateway Route Table Association identifiers.
- transit
Gateway stringRoute Table Id - filters
Get
Route Table Associations Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- Set of Transit Gateway Route Table Association identifiers.
- transit_
gateway_ strroute_ table_ id - filters
Sequence[Get
Route Table Associations Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- Set of Transit Gateway Route Table Association identifiers.
- transit
Gateway StringRoute Table Id - filters List<Property Map>
Supporting Types
GetRouteTableAssociationsFilter
- 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 Transit 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 Transit 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 Transit 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 Transit 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 Transit 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 Transit 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.