Skip to content
v2.273.0

VpcContextResponse Struct ​

Properties of a discovered VPC.

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 ​

availabilityZonesstring[]availability_zonestyping.List[str]availabilityZonesList<String>AvailabilityZonesstring[]AvailabilityZones*[]*stringrequired#
AZs.
isolatedSubnetIdsstring[]isolated_subnet_idstyping.List[str]isolatedSubnetIdsList<String>IsolatedSubnetIdsstring[]IsolatedSubnetIds*[]*string#
IDs of all isolated subnets.

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

isolatedSubnetNamesstring[]isolated_subnet_namestyping.List[str]isolatedSubnetNamesList<String>IsolatedSubnetNamesstring[]IsolatedSubnetNames*[]*string#
Name of isolated subnet groups.

Element count: #(isolatedGroups)

isolatedSubnetRouteTableIdsstring[]isolated_subnet_route_table_idstyping.List[str]isolatedSubnetRouteTableIdsList<String>IsolatedSubnetRouteTableIdsstring[]IsolatedSubnetRouteTableIds*[]*string#
Route Table IDs of isolated subnet groups.

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

ownerAccountIdstringowner_account_idstrownerAccountIdStringOwnerAccountIdstringOwnerAccountId*string= the account id of the parent sta…#
The ID of the AWS account that owns the VPC.
default

Default: the account id of the parent stack

privateSubnetIdsstring[]private_subnet_idstyping.List[str]privateSubnetIdsList<String>PrivateSubnetIdsstring[]PrivateSubnetIds*[]*string#
IDs of all private subnets.

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

privateSubnetNamesstring[]private_subnet_namestyping.List[str]privateSubnetNamesList<String>PrivateSubnetNamesstring[]PrivateSubnetNames*[]*string#
Name of private subnet groups.

Element count: #(privateGroups)

privateSubnetRouteTableIdsstring[]private_subnet_route_table_idstyping.List[str]privateSubnetRouteTableIdsList<String>PrivateSubnetRouteTableIdsstring[]PrivateSubnetRouteTableIds*[]*string#
Route Table IDs of private subnet groups.

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

publicSubnetIdsstring[]public_subnet_idstyping.List[str]publicSubnetIdsList<String>PublicSubnetIdsstring[]PublicSubnetIds*[]*string#
IDs of all public subnets.

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

publicSubnetNamesstring[]public_subnet_namestyping.List[str]publicSubnetNamesList<String>PublicSubnetNamesstring[]PublicSubnetNames*[]*string#
Name of public subnet groups.

Element count: #(publicGroups)

publicSubnetRouteTableIdsstring[]public_subnet_route_table_idstyping.List[str]publicSubnetRouteTableIdsList<String>PublicSubnetRouteTableIdsstring[]PublicSubnetRouteTableIds*[]*string#
Route Table IDs of public subnet groups.

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

regionstringregionstrregionStringRegionstringRegion*string= Region of the parent stack#
The region in which the VPC is in.
subnetGroupsVpcSubnetGroup[]subnet_groupstyping.List[VpcSubnetGroup]subnetGroupsList<VpcSubnetGroup>SubnetGroupsVpcSubnetGroup[]SubnetGroups*[]VpcSubnetGroup= no subnet groups will be returne…#
The subnet groups discovered for the given VPC.

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.

default

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

vpcCidrBlockstringvpc_cidr_blockstrvpcCidrBlockStringVpcCidrBlockstringVpcCidrBlock*string= CIDR information not available#
VPC cidr.
vpcIdstringvpc_idstrvpcIdStringVpcIdstringVpcId*stringrequired#
VPC id.
vpnGatewayIdstringvpn_gateway_idstrvpnGatewayIdStringVpnGatewayIdstringVpnGatewayId*string#
The VPN gateway ID.