Skip to content
v2.278.0

CfnSubnetRouteTableAssociationProps Struct ​

Properties for defining a CfnSubnetRouteTableAssociation.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnSubnetRouteTableAssociationProps: ec2.CfnSubnetRouteTableAssociationProps = {
  routeTableId: 'routeTableId',
  subnetId: 'subnetId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_subnet_route_table_association_props = ec2.CfnSubnetRouteTableAssociationProps(
    route_table_id="routeTableId",
    subnet_id="subnetId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

CfnSubnetRouteTableAssociationProps cfnSubnetRouteTableAssociationProps = CfnSubnetRouteTableAssociationProps.builder()
        .routeTableId("routeTableId")
        .subnetId("subnetId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var cfnSubnetRouteTableAssociationProps = new CfnSubnetRouteTableAssociationProps {
    RouteTableId = "routeTableId",
    SubnetId = "subnetId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSubnetRouteTableAssociationProps := &CfnSubnetRouteTableAssociationProps{
	RouteTableId: jsii.String("routeTableId"),
	SubnetId: jsii.String("subnetId"),
}

Properties ​

routeTableIdstring | IRouteTableRefroute_table_idtyping.Union[str, IRouteTableRef]routeTableIdStringRouteTableIdstringRouteTableIdinterface{} required #
The ID of the route table.

The physical ID changes when the route table ID is changed.

subnetIdstring | ISubnetRefsubnet_idtyping.Union[str, ISubnetRef]subnetIdStringSubnetIdstringSubnetIdinterface{} required #
The ID of the subnet.