aws-cdk-lib.cx_api.VpcSubnetGroup

interface VpcSubnetGroup

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

A group of subnets returned by the VPC provider.

The included subnets do NOT have to be symmetric!

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 vpcSubnetGroup: cx_api.VpcSubnetGroup = {
  name: 'name',
  subnets: [{
    availabilityZone: 'availabilityZone',
    routeTableId: 'routeTableId',
    subnetId: 'subnetId',

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

Properties

NameTypeDescription
namestringThe name of the subnet group, determined by looking at the tags of of the subnets that belong to it.
subnetsVpcSubnet[]The subnets that are part of this group.
typeVpcSubnetGroupTypeThe type of the subnet group.

name

Type: string

The name of the subnet group, determined by looking at the tags of of the subnets that belong to it.


subnets

Type: VpcSubnet[]

The subnets that are part of this group.

There is no condition that the subnets have to be symmetric in the group.


type

Type: VpcSubnetGroupType

The type of the subnet group.