Class: AWS::EC2::AvailabilityZoneCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::AvailabilityZoneCollection
- Defined in:
- lib/aws/ec2/availability_zone_collection.rb
Overview
Represents all EC2 availability zones that are currently available to your account.
Instance Attribute Summary
Attributes included from Core::Model
Instance Method Summary collapse
-
#each(&block) ⇒ nil
Yields each of the EC2 availability zones.
Methods inherited from Collection
Methods included from FilteredCollection
#filter, #filtered_request, #initialize
Methods included from Core::Model
#client, #config_prefix, #initialize, #inspect
Instance Method Details
#each(&block) ⇒ nil
Yields each of the EC2 availability zones.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/aws/ec2/availability_zone_collection.rb', line 23 def each &block resp = filtered_request(:describe_availability_zones) resp.availability_zone_info.each do |az| zone = AvailabilityZone.new(az.zone_name, :region_name => az.region_name, :config => config) yield(zone) end nil end |