aws-cdk-lib.aws_ec2.CfnRouteProps

interface CfnRouteProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnRouteProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnRouteProps
Javasoftware.amazon.awscdk.services.ec2.CfnRouteProps
Pythonaws_cdk.aws_ec2.CfnRouteProps
TypeScript aws-cdk-lib » aws_ec2 » CfnRouteProps

Properties for defining a CfnRoute.

Example

// 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 cfnRouteProps: ec2.CfnRouteProps = {
  routeTableId: 'routeTableId',

  // the properties below are optional
  carrierGatewayId: 'carrierGatewayId',
  destinationCidrBlock: 'destinationCidrBlock',
  destinationIpv6CidrBlock: 'destinationIpv6CidrBlock',
  egressOnlyInternetGatewayId: 'egressOnlyInternetGatewayId',
  gatewayId: 'gatewayId',
  instanceId: 'instanceId',
  localGatewayId: 'localGatewayId',
  natGatewayId: 'natGatewayId',
  networkInterfaceId: 'networkInterfaceId',
  transitGatewayId: 'transitGatewayId',
  vpcEndpointId: 'vpcEndpointId',
  vpcPeeringConnectionId: 'vpcPeeringConnectionId',
};

Properties

NameTypeDescription
routeTableIdstringThe ID of the route table for the route.
carrierGatewayId?stringThe ID of the carrier gateway.
destinationCidrBlock?stringThe IPv4 CIDR address block used for the destination match.
destinationIpv6CidrBlock?stringThe IPv6 CIDR block used for the destination match.
egressOnlyInternetGatewayId?string[IPv6 traffic only] The ID of an egress-only internet gateway.
gatewayId?stringThe ID of an internet gateway or virtual private gateway attached to your VPC.
instanceId?stringThe ID of a NAT instance in your VPC.
localGatewayId?stringThe ID of the local gateway.
natGatewayId?string[IPv4 traffic only] The ID of a NAT gateway.
networkInterfaceId?stringThe ID of a network interface.
transitGatewayId?stringThe ID of a transit gateway.
vpcEndpointId?stringThe ID of a VPC endpoint.
vpcPeeringConnectionId?stringThe ID of a VPC peering connection.

routeTableId

Type: string

The ID of the route table for the route.


carrierGatewayId?

Type: string (optional)

The ID of the carrier gateway.

You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.


destinationCidrBlock?

Type: string (optional)

The IPv4 CIDR address block used for the destination match.

Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .


destinationIpv6CidrBlock?

Type: string (optional)

The IPv6 CIDR block used for the destination match.

Routing decisions are based on the most specific match.


egressOnlyInternetGatewayId?

Type: string (optional)

[IPv6 traffic only] The ID of an egress-only internet gateway.


gatewayId?

Type: string (optional)

The ID of an internet gateway or virtual private gateway attached to your VPC.


instanceId?

Type: string (optional)

The ID of a NAT instance in your VPC.

The operation fails if you specify an instance ID unless exactly one network interface is attached.


localGatewayId?

Type: string (optional)

The ID of the local gateway.


natGatewayId?

Type: string (optional)

[IPv4 traffic only] The ID of a NAT gateway.


networkInterfaceId?

Type: string (optional)

The ID of a network interface.


transitGatewayId?

Type: string (optional)

The ID of a transit gateway.


vpcEndpointId?

Type: string (optional)

The ID of a VPC endpoint.

Supported for Gateway Load Balancer endpoints only.


vpcPeeringConnectionId?

Type: string (optional)

The ID of a VPC peering connection.