SubnetFilter

class aws_cdk.aws_ec2.SubnetFilter

Bases: object

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

select_subnets(_subnets)

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

Parameters

_subnets (List[ISubnet]) –

Return type

List[ISubnet]

Static Methods

classmethod availability_zones(availability_zones)

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

Parameters

availability_zones (List[str]) –

Return type

SubnetFilter

classmethod contains_ip_addresses(ipv4addrs)

Chooses subnets which contain any of the specified IP addresses.

Parameters

ipv4addrs (List[str]) –

Return type

SubnetFilter

classmethod one_per_az()

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

Return type

SubnetFilter