> **Experimental**
>
> `@aws-cdk/aws-ec2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# RouteProps

Properties to define a route.

Extends: RouteProps
Used as props by: Route

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/route.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-ec2-alpha/lib/route.ts#L683)

## Example

```ts
const myVpc = new VpcV2(this, 'Vpc');
const routeTable = new RouteTable(this, 'RouteTable', {
  vpc: myVpc,
});
const subnet = new SubnetV2(this, 'Subnet', {
  vpc: myVpc,
  availabilityZone: 'eu-west-2a',
  ipv4CidrBlock: new IpCidr('10.0.0.0/24'),
  subnetType: SubnetType.PRIVATE_ISOLATED });

const natgw = new NatGateway(this, 'NatGW', {
  subnet: subnet,
  vpc: myVpc,
  connectivityType: NatConnectivityType.PRIVATE,
  privateIpAddress: '10.0.0.42',
});
new Route(this, 'NatGwRoute', {
  routeTable,
  destination: '0.0.0.0/0',
  target: { gateway: natgw },
});
```

## Properties

- `destination`: string (required) — The IPv4 or IPv6 CIDR block used for the destination match.

  Routing decisions are based on the most specific match.

- `routeName`: string — The resource name of the route.

  **Default:** provisioned without a route name

- `routeTable`: [IRouteTable](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IRouteTable.html) (required) — The ID of the route table for the route.

- `target`: [RouteTargetType](/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.RouteTargetType.html) (required) — The gateway or endpoint targeted by the route.
