Show / Hide Table of Contents

Class PublicSubnet

Represents a public VPC subnet resource.

Inheritance
System.Object
Construct
Resource
Subnet
PublicSubnet
Implements
IPublicSubnet
ISubnet
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
Subnet.FromSubnetAttributes(Construct, String, ISubnetAttributes)
Subnet.FromSubnetId(Construct, String, String)
Subnet.IsVpcSubnet(Object)
Subnet.AddDefaultInternetRoute(String, IDependable)
Subnet.AddDefaultNatRoute(String)
Subnet.AddRoute(String, IAddRouteOptions)
Subnet.AssociateNetworkAcl(String, INetworkAcl)
Subnet.AvailabilityZone
Subnet.DependencyElements
Subnet.InternetConnectivityEstablished
Subnet.Ipv4CidrBlock
Subnet.NetworkAcl
Subnet.RouteTable
Subnet.SubnetAvailabilityZone
Subnet.SubnetId
Subnet.SubnetIpv6CidrBlocks
Subnet.SubnetNetworkAclAssociationId
Subnet.SubnetOutpostArn
Subnet.SubnetVpcId
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class PublicSubnet : Subnet, IPublicSubnet, ISubnet, IResource, IConstruct, IConstruct, IDependable
Syntax (vb)
Public Class PublicSubnet
    Inherits Subnet
    Implements IPublicSubnet, ISubnet, IResource, IConstruct, IConstruct, IDependable
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;

PublicSubnet publicSubnet = new PublicSubnet(this, "MyPublicSubnet", new PublicSubnetProps {
    AvailabilityZone = "availabilityZone",
    CidrBlock = "cidrBlock",
    VpcId = "vpcId",

    // the properties below are optional
    MapPublicIpOnLaunch = false
});

Synopsis

Constructors

PublicSubnet(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

PublicSubnet(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

PublicSubnet(Construct, String, IPublicSubnetProps)

Methods

AddNatGateway(String)

Creates a new managed NAT gateway attached to this public subnet.

FromPublicSubnetAttributes(Construct, String, IPublicSubnetAttributes)

Constructors

PublicSubnet(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected PublicSubnet(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

PublicSubnet(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected PublicSubnet(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

PublicSubnet(Construct, String, IPublicSubnetProps)

public PublicSubnet(Construct scope, string id, IPublicSubnetProps props)
Parameters
scope Constructs.Construct
id System.String
props IPublicSubnetProps

Methods

AddNatGateway(String)

Creates a new managed NAT gateway attached to this public subnet.

public virtual CfnNatGateway AddNatGateway(string eipAllocationId = null)
Parameters
eipAllocationId System.String
Returns

CfnNatGateway

A ref to the the NAT Gateway ID

Remarks

Also adds the EIP for the managed NAT.

FromPublicSubnetAttributes(Construct, String, IPublicSubnetAttributes)

public static IPublicSubnet FromPublicSubnetAttributes(Construct scope, string id, IPublicSubnetAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs IPublicSubnetAttributes
Returns

IPublicSubnet

Implements

IPublicSubnet
ISubnet
IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX