Show / Hide Table of Contents

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
object
SubnetFilter
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.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()

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.

Methods

AvailabilityZones(string[])

Chooses subnets which are in one of the given availability zones.

ByCidrMask(double)

Chooses subnets which have the provided CIDR netmask.

ByCidrRanges(string[])

Chooses subnets which are inside any of the specified CIDR range.

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()

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.

protected SubnetFilter()
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" });

Methods

AvailabilityZones(string[])

Chooses subnets which are in one of the given availability zones.

public static SubnetFilter AvailabilityZones(string[] availabilityZones)
Parameters
availabilityZones string[]
Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

ByCidrMask(double)

Chooses subnets which have the provided CIDR netmask.

public static SubnetFilter ByCidrMask(double mask)
Parameters
mask double
Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

ByCidrRanges(string[])

Chooses subnets which are inside any of the specified CIDR range.

public static SubnetFilter ByCidrRanges(string[] cidrs)
Parameters
cidrs string[]

List of CIDR ranges to filter subnets from.

Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

ByIds(string[])

Chooses subnets by id.

public static SubnetFilter ByIds(string[] subnetIds)
Parameters
subnetIds string[]
Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

ContainsIpAddresses(string[])

Chooses subnets which contain any of the specified IP addresses.

public static SubnetFilter ContainsIpAddresses(string[] ipv4Addrs)
Parameters
ipv4Addrs string[]
Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

OnePerAz()

Chooses subnets such that there is at most one per availability zone.

public static SubnetFilter OnePerAz()
Returns

SubnetFilter

Remarks

ExampleMetadata: fixture=_generated

SelectSubnets(ISubnet[])

Executes the subnet filtering logic, returning a filtered set of subnets.

public virtual ISubnet[] SelectSubnets(ISubnet[] subnets)
Parameters
subnets ISubnet[]
Returns

ISubnet[]

Remarks

ExampleMetadata: fixture=_generated

Back to top Generated by DocFX