# CfnRouteProps

Properties for defining a `CfnRoute`.

Extends: CfnRouteProps
Used as props by: CfnRoute

- Source: Generated code
- Type last changed: v2.260.0 · 16 Jun 2026

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

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

## Properties

- `carrierGatewayId`: string | [ICarrierGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.ICarrierGatewayRef.html) — 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.

- `coreNetworkArn`: string — The Amazon Resource Name (ARN) of the core network.

- `destinationCidrBlock`: string — 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`: string — The IPv6 CIDR block used for the destination match.

  Routing decisions are based on the most specific match.

- `destinationPrefixListId`: string — The ID of a prefix list used for the destination match.

- `egressOnlyInternetGatewayId`: string | [IEgressOnlyInternetGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IEgressOnlyInternetGatewayRef.html) — [IPv6 traffic only] The ID of an egress-only internet gateway.

- `gatewayId`: string | [IInternetGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IInternetGatewayRef.html) | [IVPNGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPNGatewayRef.html) — The ID of an internet gateway or virtual private gateway attached to your VPC.

- `instanceId`: string | [IInstanceRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IInstanceRef.html) — 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`: string — The ID of the local gateway.

- `natGatewayId`: string | [INatGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.INatGatewayRef.html) — [IPv4 traffic only] The ID of a NAT gateway.

- `networkInterfaceId`: string — The ID of a network interface.

- `odbNetworkArn`: string — The Amazon Resource Name (ARN) of the ODB network.

- `routeTableId`: string | [IRouteTableRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IRouteTableRef.html) (required) — The ID of the route table for the route.

- `transitGatewayId`: string | [ITransitGatewayRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.ITransitGatewayRef.html) — The ID of a transit gateway.

- `vpcEndpointId`: string — The ID of a VPC endpoint.

  Supported for Gateway Load Balancer endpoints only.

- `vpcPeeringConnectionId`: string | [IVPCPeeringConnectionRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPCPeeringConnectionRef.html) — The ID of a VPC peering connection.
