# ClientVpnRouteTarget

Target for a client VPN route.

- Source: [`aws-ec2/lib/client-vpn-route.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/client-vpn-route.ts#L42)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

```ts
const endpoint = vpc.addClientVpnEndpoint('Endpoint', {
  cidr: '10.100.0.0/16',
  serverCertificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/server-certificate-id',
  userBasedAuthentication: ec2.ClientVpnUserBasedAuthentication.federated(samlProvider),
});

// Client-to-client access
endpoint.addRoute('Route', {
  cidr: '10.100.0.0/16',
  target: ec2.ClientVpnRouteTarget.local(),
});
```

## Initializer

```ts
new ClientVpnRouteTarget()
```

## Properties

- `subnetId`: string (required) — The subnet ID.

## Methods

- `local(): ClientVpnRouteTarget // chainable` (static) — Local network.

- `subnet(subnet: ISubnetRef): ClientVpnRouteTarget // chainable` (static) — Subnet.

  The specified subnet must be an existing target network of the client VPN
  endpoint.
