Class SubnetProps
Specify configuration parameters for a VPC subnet.
Inheritance
System.Object
SubnetProps
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class SubnetProps : Object, ISubnetProps
Syntax (vb)
Public Class SubnetProps
Inherits Object
Implements 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 subnetProps = new SubnetProps {
AvailabilityZone = "availabilityZone",
CidrBlock = "cidrBlock",
VpcId = "vpcId",
// the properties below are optional
MapPublicIpOnLaunch = false
};
Synopsis
Constructors
SubnetProps() |
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
SubnetProps()
public SubnetProps()
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