Class SubnetFilter
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.SubnetFilter
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-04T00:39:31.396Z")
@Stability(Stable)
public abstract class SubnetFilter
extends software.amazon.jsii.JsiiObject
Contains logic which chooses a set of subnets from a larger list, in conjunction with SubnetSelection, to determine where to place AWS resources such as VPC endpoints, EC2 instances, etc.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; SubnetFilter subnetFilter = SubnetFilter.availabilityZones(List.of("availabilityZones"));
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
SubnetFilter
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
SubnetFilter
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic SubnetFilter
availabilityZones
(List<String> availabilityZones) Chooses subnets which are in one of the given availability zones.static SubnetFilter
byCidrMask
(Number mask) Chooses subnets which have the provided CIDR netmask.static SubnetFilter
byCidrRanges
(List<String> cidrs) Chooses subnets which are inside any of the specified CIDR range.static SubnetFilter
Chooses subnets by id.static SubnetFilter
containsIpAddresses
(List<String> ipv4addrs) Chooses subnets which contain any of the specified IP addresses.static SubnetFilter
onePerAz()
Chooses subnets such that there is at most one per availability zone.selectSubnets
(List<ISubnet> _subnets) Executes the subnet filtering logic, returning a filtered set of subnets.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SubnetFilter
protected SubnetFilter(software.amazon.jsii.JsiiObjectRef objRef) -
SubnetFilter
protected SubnetFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SubnetFilter
@Stability(Stable) protected SubnetFilter()
-
-
Method Details
-
availabilityZones
@Stability(Stable) @NotNull public static SubnetFilter availabilityZones(@NotNull List<String> availabilityZones) Chooses subnets which are in one of the given availability zones.- Parameters:
availabilityZones
- This parameter is required.
-
byCidrMask
Chooses subnets which have the provided CIDR netmask.- Parameters:
mask
- This parameter is required.
-
byCidrRanges
Chooses subnets which are inside any of the specified CIDR range.- Parameters:
cidrs
- List of CIDR ranges to filter subnets from. This parameter is required.
-
byIds
Chooses subnets by id.- Parameters:
subnetIds
- This parameter is required.
-
containsIpAddresses
@Stability(Stable) @NotNull public static SubnetFilter containsIpAddresses(@NotNull List<String> ipv4addrs) Chooses subnets which contain any of the specified IP addresses.- Parameters:
ipv4addrs
- This parameter is required.
-
onePerAz
Chooses subnets such that there is at most one per availability zone. -
selectSubnets
Executes the subnet filtering logic, returning a filtered set of subnets.- Parameters:
_subnets
- This parameter is required.
-