aws-cdk-lib.cx_api.VpcContextResponse

interface VpcContextResponse

LanguageType name
.NETAmazon.CDK.CXAPI.VpcContextResponse
Gogithub.com/aws/aws-cdk-go/awscdk/v2/cxapi#VpcContextResponse
Javasoftware.amazon.awscdk.cxapi.VpcContextResponse
Pythonaws_cdk.cx_api.VpcContextResponse
TypeScript (source)aws-cdk-lib » cx_api » VpcContextResponse

Properties of a discovered VPC.

Example

// 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

NameTypeDescription
availabilityZonesstring[]AZs.
vpcIdstringVPC id.
isolatedSubnetIds?string[]IDs of all isolated subnets.
isolatedSubnetNames?string[]Name of isolated subnet groups.
isolatedSubnetRouteTableIds?string[]Route Table IDs of isolated subnet groups.
ownerAccountId?stringThe ID of the AWS account that owns the VPC.
privateSubnetIds?string[]IDs of all private subnets.
privateSubnetNames?string[]Name of private subnet groups.
privateSubnetRouteTableIds?string[]Route Table IDs of private subnet groups.
publicSubnetIds?string[]IDs of all public subnets.
publicSubnetNames?string[]Name of public subnet groups.
publicSubnetRouteTableIds?string[]Route Table IDs of public subnet groups.
region?stringThe region in which the VPC is in.
subnetGroups?VpcSubnetGroup[]The subnet groups discovered for the given VPC.
vpcCidrBlock?stringVPC cidr.
vpnGatewayId?stringThe VPN gateway ID.

availabilityZones

Type: string[]

AZs.


vpcId

Type: string

VPC id.


isolatedSubnetIds?

Type: string[] (optional)

IDs of all isolated subnets.

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


isolatedSubnetNames?

Type: string[] (optional)

Name of isolated subnet groups.

Element count: #(isolatedGroups)


isolatedSubnetRouteTableIds?

Type: string[] (optional)

Route Table IDs of isolated subnet groups.

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


ownerAccountId?

Type: string (optional, default: the account id of the parent stack)

The ID of the AWS account that owns the VPC.


privateSubnetIds?

Type: string[] (optional)

IDs of all private subnets.

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


privateSubnetNames?

Type: string[] (optional)

Name of private subnet groups.

Element count: #(privateGroups)


privateSubnetRouteTableIds?

Type: string[] (optional)

Route Table IDs of private subnet groups.

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


publicSubnetIds?

Type: string[] (optional)

IDs of all public subnets.

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


publicSubnetNames?

Type: string[] (optional)

Name of public subnet groups.

Element count: #(publicGroups)


publicSubnetRouteTableIds?

Type: string[] (optional)

Route Table IDs of public subnet groups.

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


region?

Type: string (optional, default: Region of the parent stack)

The region in which the VPC is in.


subnetGroups?

Type: VpcSubnetGroup[] (optional, default: no subnet groups will be returned unless VpcContextQuery.returnAsymmetricSubnets is true)

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.


vpcCidrBlock?

Type: string (optional, default: CIDR information not available)

VPC cidr.


vpnGatewayId?

Type: string (optional)

The VPN gateway ID.