aws-cdk-lib.aws_ec2.PublicSubnetProps
interface PublicSubnetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EC2.PublicSubnetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#PublicSubnetProps |
![]() | software.amazon.awscdk.services.ec2.PublicSubnetProps |
![]() | aws_cdk.aws_ec2.PublicSubnetProps |
![]() | aws-cdk-lib » aws_ec2 » PublicSubnetProps |
Example
// 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 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.