interface PublicSubnetProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.PublicSubnetProps |
Java | software.amazon.awscdk.services.ec2.PublicSubnetProps |
Python | aws_cdk.aws_ec2.PublicSubnetProps |
TypeScript (source) | @aws-cdk/aws-ec2 » PublicSubnetProps |
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 publicSubnetProps: ec2.PublicSubnetProps = {
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.