interface RouteTableProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.RouteTableProps |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#RouteTableProps |
Java | software.amazon.awscdk.services.ec2.alpha.RouteTableProps |
Python | aws_cdk.aws_ec2_alpha.RouteTableProps |
TypeScript (source) | @aws-cdk/aws-ec2-alpha » RouteTableProps |
Properties to define a route table.
Example
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc');
const vpnGateway = myVpc.enableVpnGatewayV2({
vpnRoutePropagation: [{ subnetType: SubnetType.PUBLIC }],
type: VpnConnectionType.IPSEC_1,
});
const routeTable = new RouteTable(stack, 'routeTable', {
vpc: myVpc
} );
new Route(stack, 'route', {
destination: '172.31.0.0/24',
target: { gateway: vpnGateway },
routeTable: routeTable,
});
Properties
Name | Type | Description |
---|---|---|
vpc | IVpc | The ID of the VPC. |
route | string | The resource name of the route table. |
vpc
Type:
IVpc
The ID of the VPC.
routeTableName?
Type:
string
(optional, default: provisioned without a route table name)
The resource name of the route table.