# VpcContextResponse

Properties of a discovered VPC.

- Source: [`cx-api/lib/legacy-moved.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/cx-api/lib/legacy-moved.ts#L902)
- 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 vpcContextResponse: cx_api.VpcContextResponse = {
  availabilityZones: ['availabilityZones'],
  vpcId: 'vpcId',

  // the properties below are optional
  isolatedSubnetIds: ['isolatedSubnetIds'],
  isolatedSubnetNames: ['isolatedSubnetNames'],
  isolatedSubnetRouteTableIds: ['isolatedSubnetRouteTableIds'],
  ownerAccountId: 'ownerAccountId',
  privateSubnetIds: ['privateSubnetIds'],
  privateSubnetNames: ['privateSubnetNames'],
  privateSubnetRouteTableIds: ['privateSubnetRouteTableIds'],
  publicSubnetIds: ['publicSubnetIds'],
  publicSubnetNames: ['publicSubnetNames'],
  publicSubnetRouteTableIds: ['publicSubnetRouteTableIds'],
  region: 'region',
  subnetGroups: [{
    name: 'name',
    subnets: [{
      availabilityZone: 'availabilityZone',
      routeTableId: 'routeTableId',
      subnetId: 'subnetId',

      // the properties below are optional
      cidr: 'cidr',
    }],
    type: cx_api.VpcSubnetGroupType.PUBLIC,
  }],
  vpcCidrBlock: 'vpcCidrBlock',
  vpnGatewayId: 'vpnGatewayId',
};
```

## Properties

- `availabilityZones`: string[] (required) — AZs.

- `isolatedSubnetIds`: string[] — IDs of all isolated subnets.

  Element count: #(availabilityZones) · #(isolatedGroups)

- `isolatedSubnetNames`: string[] — Name of isolated subnet groups.

  Element count: #(isolatedGroups)

- `isolatedSubnetRouteTableIds`: string[] — Route Table IDs of isolated subnet groups.

  Element count: #(availabilityZones) · #(isolatedGroups)

- `ownerAccountId`: string — The ID of the AWS account that owns the VPC.

  **Default:** the account id of the parent stack

- `privateSubnetIds`: string[] — IDs of all private subnets.

  Element count: #(availabilityZones) · #(privateGroups)

- `privateSubnetNames`: string[] — Name of private subnet groups.

  Element count: #(privateGroups)

- `privateSubnetRouteTableIds`: string[] — Route Table IDs of private subnet groups.

  Element count: #(availabilityZones) · #(privateGroups)

- `publicSubnetIds`: string[] — IDs of all public subnets.

  Element count: #(availabilityZones) · #(publicGroups)

- `publicSubnetNames`: string[] — Name of public subnet groups.

  Element count: #(publicGroups)

- `publicSubnetRouteTableIds`: string[] — Route Table IDs of public subnet groups.

  Element count: #(availabilityZones) · #(publicGroups)

- `region`: string — The region in which the VPC is in.

  **Default:** Region of the parent stack

- `subnetGroups`: [VpcSubnetGroup](/cdk/api/v2/docs/aws-cdk-lib.cx_api.VpcSubnetGroup.html)[] — The subnet groups discovered for the given VPC.

  **Default:** no subnet groups will be returned unless `VpcContextQuery.returnAsymmetricSubnets` is true

  Unlike the above properties, this will include asymmetric subnets,
  if the VPC has any.
  This property will only be populated if `VpcContextQuery.returnAsymmetricSubnets`
  is true.

- `vpcCidrBlock`: string — VPC cidr.

  **Default:** CIDR information not available

- `vpcId`: string (required) — VPC id.

- `vpnGatewayId`: string — The VPN gateway ID.
