Skip to content
v2.274.0

RequestedSubnet Struct ​

Subnet requested for allocation.

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 requestedSubnet: ec2.RequestedSubnet = {
  availabilityZone: 'availabilityZone',
  configuration: {
    name: 'name',
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,

    // the properties below are optional
    cidrMask: 123,
    ipv6AssignAddressOnCreation: false,
    mapPublicIpOnLaunch: false,
    reserved: false,
  },
  subnetConstructId: 'subnetConstructId',
};

Properties ​

availabilityZonestringavailability_zonestravailabilityZoneStringAvailabilityZonestringAvailabilityZone*stringrequired#
The availability zone for the subnet.
configurationSubnetConfigurationconfigurationSubnetConfigurationconfigurationSubnetConfigurationConfigurationSubnetConfigurationConfigurationSubnetConfigurationrequired#
Specify configuration parameters for a single subnet group in a VPC.
subnetConstructIdstringsubnet_construct_idstrsubnetConstructIdStringSubnetConstructIdstringSubnetConstructId*stringrequired#
Id for the Subnet construct.