1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. getSubnetRouteTableAssociation

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.ec2.getSubnetRouteTableAssociation

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. A route table can be associated with multiple subnets. To create a route table, see AWS::EC2::RouteTable.

Using getSubnetRouteTableAssociation

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 getSubnetRouteTableAssociation(args: GetSubnetRouteTableAssociationArgs, opts?: InvokeOptions): Promise<GetSubnetRouteTableAssociationResult>
function getSubnetRouteTableAssociationOutput(args: GetSubnetRouteTableAssociationOutputArgs, opts?: InvokeOptions): Output<GetSubnetRouteTableAssociationResult>
Copy
def get_subnet_route_table_association(id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetSubnetRouteTableAssociationResult
def get_subnet_route_table_association_output(id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetSubnetRouteTableAssociationResult]
Copy
func LookupSubnetRouteTableAssociation(ctx *Context, args *LookupSubnetRouteTableAssociationArgs, opts ...InvokeOption) (*LookupSubnetRouteTableAssociationResult, error)
func LookupSubnetRouteTableAssociationOutput(ctx *Context, args *LookupSubnetRouteTableAssociationOutputArgs, opts ...InvokeOption) LookupSubnetRouteTableAssociationResultOutput
Copy

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

public static class GetSubnetRouteTableAssociation 
{
    public static Task<GetSubnetRouteTableAssociationResult> InvokeAsync(GetSubnetRouteTableAssociationArgs args, InvokeOptions? opts = null)
    public static Output<GetSubnetRouteTableAssociationResult> Invoke(GetSubnetRouteTableAssociationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubnetRouteTableAssociationResult> getSubnetRouteTableAssociation(GetSubnetRouteTableAssociationArgs args, InvokeOptions options)
public static Output<GetSubnetRouteTableAssociationResult> getSubnetRouteTableAssociation(GetSubnetRouteTableAssociationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:ec2:getSubnetRouteTableAssociation
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The ID of the subnet route table association.
Id This property is required. string
The ID of the subnet route table association.
id This property is required. String
The ID of the subnet route table association.
id This property is required. string
The ID of the subnet route table association.
id This property is required. str
The ID of the subnet route table association.
id This property is required. String
The ID of the subnet route table association.

getSubnetRouteTableAssociation Result

The following output properties are available:

Id string
The ID of the subnet route table association.
Id string
The ID of the subnet route table association.
id String
The ID of the subnet route table association.
id string
The ID of the subnet route table association.
id str
The ID of the subnet route table association.
id String
The ID of the subnet route table association.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi