interface PrivateSubnetProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.PrivateSubnetProps |
Java | software.amazon.awscdk.services.ec2.PrivateSubnetProps |
Python | aws_cdk.aws_ec2.PrivateSubnetProps |
TypeScript (source) | @aws-cdk/aws-ec2 » PrivateSubnetProps |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
const privateSubnetProps: ec2.PrivateSubnetProps = {
availabilityZone: 'availabilityZone',
cidrBlock: 'cidrBlock',
vpcId: 'vpcId',
// the properties below are optional
mapPublicIpOnLaunch: false,
};
Properties
Name | Type | Description |
---|---|---|
availability | string | The availability zone for the subnet. |
cidr | string | The CIDR notation for this subnet. |
vpc | string | The VPC which this subnet is part of. |
map | boolean | Controls if a public IP is associated to an instance at launch. |
availabilityZone
Type:
string
The availability zone for the subnet.
cidrBlock
Type:
string
The CIDR notation for this subnet.
vpcId
Type:
string
The VPC which this subnet is part of.
mapPublicIpOnLaunch?
Type:
boolean
(optional, default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.)
Controls if a public IP is associated to an instance at launch.