SubnetType Enum
The type of Subnet.
Example
ts
declare const vpc: ec2.Vpc;
const cluster = new docdb.DatabaseCluster(this, 'Database', {
masterUser: {
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', // optional, if you prefer to specify the secret name
},
instanceType: ec2.InstanceType.of(ec2.InstanceClass.MEMORY5, ec2.InstanceSize.LARGE),
vpcSubnets: {
subnetType: ec2.SubnetType.PUBLIC,
},
vpc,
copyTagsToSnapshot: true // whether to save the cluster tags when creating the snapshot.
});
Members
| Member | 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 | Subnet that routes to the internet (via a NAT gateway), but not vice versa. |
PUBLIC | Subnet connected to the Internet. |
Referenced by
ISubnetV2.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetTypeSubnetConfiguration.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetTypeSubnetSelection.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetTypeSubnetV2.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetTypeSubnetV2Attributes.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetTypeSubnetV2Props.subnetTypesubnet_typesubnetTypeSubnetTypeSubnetType