module Awspec::Helper::Finder
Constants
- CLIENTS
- CLIENT_OPTIONS
Public Instance Methods
select_subnet_by_vpc_id(vpc_id)
click to toggle source
Search for the subnets associated with a given VPC ID.
Returns an array of Aws::EC2::Types::Subnet
instances.
# File lib/awspec/helper/finder/subnet.rb, line 128 def select_subnet_by_vpc_id(vpc_id) res = ec2_client.describe_subnets({ filters: [{ name: 'vpc-id', values: [vpc_id] }] }) res.subnets end