@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:53.522Z")
public interface SubnetSelection
Constructs that allow customization of VPC placement use parameters of this type to provide placement settings.
By default, the instances are placed in the private subnets.
Example:
Vpc vpc; DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database") .masterUser(Login.builder() .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") .build()) .instanceType(InstanceType.of(InstanceClass.R5, InstanceSize.LARGE)) .vpcSubnets(SubnetSelection.builder() .subnetType(SubnetType.PUBLIC) .build()) .vpc(vpc) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
SubnetSelection.Builder
A builder for
SubnetSelection |
static class |
SubnetSelection.Jsii$Proxy
An implementation for
SubnetSelection |
Modifier and Type | Method and Description |
---|---|
static SubnetSelection.Builder |
builder() |
default java.util.List<java.lang.String> |
getAvailabilityZones()
Select subnets only in the given AZs.
|
default java.lang.Boolean |
getOnePerAz()
If true, return at most one subnet per AZ.
|
default java.util.List<SubnetFilter> |
getSubnetFilters()
List of provided subnet filters.
|
default java.lang.String |
getSubnetGroupName()
Select the subnet group with the given name.
|
default java.lang.String |
getSubnetName()
Deprecated.
Use `subnetGroupName` instead
|
default java.util.List<ISubnet> |
getSubnets()
Explicitly select individual subnets.
|
default SubnetType |
getSubnetType()
Select all subnets of the given type.
|
default java.util.List<java.lang.String> getAvailabilityZones()
Default: no filtering on AZs is done
default java.lang.Boolean getOnePerAz()
Default: false
default java.util.List<SubnetFilter> getSubnetFilters()
Default: - none
default java.lang.String getSubnetGroupName()
Select the subnet group with the given name. This only needs
to be used if you have multiple subnet groups of the same type
and you need to distinguish between them. Otherwise, prefer
subnetType
.
This field does not select individual subnets, it selects all subnets that
share the given subnet group name. This is the name supplied in
subnetConfiguration
.
At most one of subnetType
and subnetGroupName
can be supplied.
Default: - Selection by type instead of by name
@Deprecated default java.lang.String getSubnetName()
Select the subnet group with the given name. This only needs to be used if you have multiple subnet groups of the same type and you need to distinguish between them.
default java.util.List<ISubnet> getSubnets()
Use this if you don't want to automatically use all subnets in a group, but have a need to control selection down to individual subnets.
Cannot be specified together with subnetType
or subnetGroupName
.
Default: - Use all subnets in a selected group (all private subnets by default)
default SubnetType getSubnetType()
At most one of subnetType
and subnetGroupName
can be supplied.
Default: SubnetType.PRIVATE_WITH_NAT (or ISOLATED or PUBLIC if there are no PRIVATE_WITH_NAT subnets)
static SubnetSelection.Builder builder()
SubnetSelection.Builder
of SubnetSelection