Skip to content
v2.273.0

PublicSubnetAttributes Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const publicSubnetAttributes: ec2.PublicSubnetAttributes = {
  subnetId: 'subnetId',

  // the properties below are optional
  availabilityZone: 'availabilityZone',
  ipv4CidrBlock: 'ipv4CidrBlock',
  routeTableId: 'routeTableId',
};

Properties ​

availabilityZonestringavailability_zonestravailabilityZoneStringAvailabilityZonestringAvailabilityZone*string= No AZ information, cannot use AZ…#
The Availability Zone the subnet is located in.
default

Default: No AZ information, cannot use AZ selection features

ipv4CidrBlockstringipv4_cidr_blockstripv4CidrBlockStringIpv4CidrBlockstringIpv4CidrBlock*string= No CIDR information, cannot use …#
The IPv4 CIDR block associated with the subnet.
default

Default: No CIDR information, cannot use CIDR filter features

routeTableIdstringroute_table_idstrrouteTableIdStringRouteTableIdstringRouteTableId*string= No route table information, cann…#
The ID of the route table for this particular subnet.
default

Default: No route table information, cannot create VPC endpoints

subnetIdstringsubnet_idstrsubnetIdStringSubnetIdstringSubnetId*stringrequired#
The subnetId for this particular subnet.