Show / Hide Table of Contents

Enum SubnetType

The type of Subnet.

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum SubnetType
Syntax (vb)
Public Enum SubnetType
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;

            var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                MasterUser = new Login {
                    Username = "myuser",  // NOTE: 'admin' is reserved by DocumentDB
                    ExcludeCharacters = "\"@/:",  // optional, defaults to the set "\"@/" and is also used for eventually created rotations
                    SecretName = "/myapp/mydocdb/masteruser"
                },
                InstanceType = InstanceType.Of(InstanceClass.MEMORY5, InstanceSize.LARGE),
                VpcSubnets = new SubnetSelection {
                    SubnetType = SubnetType.PUBLIC
                },
                Vpc = vpc,
                CopyTagsToSnapshot = true
            });

Synopsis

Fields

PRIVATE_ISOLATED

Isolated Subnets do not route traffic to the Internet (in this VPC), and as such, do not require NAT gateways.

PRIVATE_WITH_EGRESS

Subnet that routes to the internet, but not vice versa.

PRIVATE_WITH_NAT

(deprecated) Subnet that routes to the internet (via a NAT gateway), but not vice versa.

PUBLIC

Subnet connected to the Internet.

Fields

Name Description
PRIVATE_ISOLATED

Isolated Subnets do not route traffic to the Internet (in this VPC), and as such, do not require NAT gateways.

PRIVATE_WITH_EGRESS

Subnet that routes to the internet, but not vice versa.

PRIVATE_WITH_NAT

(deprecated) Subnet that routes to the internet (via a NAT gateway), but not vice versa.

PUBLIC

Subnet connected to the Internet.

Back to top Generated by DocFX