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.104.0 (build e79254c)",
date="2024-11-21T06:34:07.226Z")
@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
ConstructorsModifierConstructorDescriptionprotectedprotectedSubnetFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSubnetFilter(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic SubnetFilteravailabilityZones(List<String> availabilityZones) Chooses subnets which are in one of the given availability zones.static SubnetFilterbyCidrMask(Number mask) Chooses subnets which have the provided CIDR netmask.static SubnetFilterbyCidrRanges(List<String> cidrs) Chooses subnets which are inside any of the specified CIDR range.static SubnetFilterChooses subnets by id.static SubnetFiltercontainsIpAddresses(List<String> ipv4addrs) Chooses subnets which contain any of the specified IP addresses.static SubnetFilteronePerAz()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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.
-