# VpcSubnet

A subnet representation that the VPC provider uses.

- Source: [`cx-api/lib/legacy-moved.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/cx-api/lib/legacy-moved.ts#L858)
- Type last changed: v2.238.0 · 9 Feb 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
const vpcSubnet: cx_api.VpcSubnet = {
  availabilityZone: 'availabilityZone',
  routeTableId: 'routeTableId',
  subnetId: 'subnetId',

  // the properties below are optional
  cidr: 'cidr',
};
```

## Properties

- `availabilityZone`: string (required) — The code of the availability zone this subnet is in (for example, 'us-west-2a').

- `cidr`: string — CIDR range of the subnet.

  **Default:** CIDR information not available

- `routeTableId`: string (required) — The identifier of the route table for this subnet.

- `subnetId`: string (required) — The identifier of the subnet.
