Class SubnetFilter
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.
Inheritance
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public abstract class SubnetFilter : DeputyBase
Syntax (vb)
Public MustInherit Class SubnetFilter
Inherits DeputyBase
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var subnetFilter = SubnetFilter.AvailabilityZones(new [] { "availabilityZones" });
Synopsis
Constructors
SubnetFilter() | |
SubnetFilter(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SubnetFilter(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
AvailabilityZones(String[]) | Chooses subnets which are in one of the given availability zones. |
ByCidrMask(Double) | Chooses subnets which have the provided CIDR netmask. |
ByIds(String[]) | Chooses subnets by id. |
ContainsIpAddresses(String[]) | Chooses subnets which contain any of the specified IP addresses. |
OnePerAz() | Chooses subnets such that there is at most one per availability zone. |
SelectSubnets(ISubnet[]) | Executes the subnet filtering logic, returning a filtered set of subnets. |
Constructors
SubnetFilter()
protected SubnetFilter()
SubnetFilter(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SubnetFilter(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SubnetFilter(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SubnetFilter(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
AvailabilityZones(String[])
Chooses subnets which are in one of the given availability zones.
public static SubnetFilter AvailabilityZones(string[] availabilityZones)
Parameters
- availabilityZones System.String[]
Returns
ByCidrMask(Double)
Chooses subnets which have the provided CIDR netmask.
public static SubnetFilter ByCidrMask(double mask)
Parameters
- mask System.Double
Returns
ByIds(String[])
Chooses subnets by id.
public static SubnetFilter ByIds(string[] subnetIds)
Parameters
- subnetIds System.String[]
Returns
ContainsIpAddresses(String[])
Chooses subnets which contain any of the specified IP addresses.
public static SubnetFilter ContainsIpAddresses(string[] ipv4Addrs)
Parameters
- ipv4Addrs System.String[]
Returns
OnePerAz()
Chooses subnets such that there is at most one per availability zone.
public static SubnetFilter OnePerAz()
Returns