Class PublicSubnetProps
Inheritance
System.Object
PublicSubnetProps
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class PublicSubnetProps : Object, IPublicSubnetProps, ISubnetProps
Syntax (vb)
Public Class PublicSubnetProps
Inherits Object
Implements IPublicSubnetProps, ISubnetProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var publicSubnetProps = new PublicSubnetProps {
AvailabilityZone = "availabilityZone",
CidrBlock = "cidrBlock",
VpcId = "vpcId",
// the properties below are optional
MapPublicIpOnLaunch = false
};
Synopsis
Constructors
PublicSubnetProps() |
Properties
AvailabilityZone | The availability zone for the subnet. |
CidrBlock | The CIDR notation for this subnet. |
MapPublicIpOnLaunch | Controls if a public IP is associated to an instance at launch. |
VpcId | The VPC which this subnet is part of. |
Constructors
PublicSubnetProps()
public PublicSubnetProps()
Properties
AvailabilityZone
The availability zone for the subnet.
public string AvailabilityZone { get; set; }
Property Value
System.String
CidrBlock
The CIDR notation for this subnet.
public string CidrBlock { get; set; }
Property Value
System.String
MapPublicIpOnLaunch
Controls if a public IP is associated to an instance at launch.
public Nullable<bool> MapPublicIpOnLaunch { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.
VpcId
The VPC which this subnet is part of.
public string VpcId { get; set; }
Property Value
System.String