Class: AWS::EC2::AvailabilityZoneCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/aws/ec2/availability_zone_collection.rb

Overview

Represents all EC2 availability zones that are currently available to your account.

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ nil

Yields each of the EC2 availability zones.

Returns:

  • (nil)


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