Represents all the regions available to your account.
@example Getting a map of endpoints by region name
ec2.regions.inject({}) { |m, r| m[r.name] = r.endpoint; m }
@return [Region] The region identified by the given name
(e.g. "us-east-1").
# File lib/aws/ec2/region_collection.rb, line 38 def [](name) super end
@yield [Region] Each region that is available to your account. @return [nil]
# File lib/aws/ec2/region_collection.rb, line 25 def each response = filtered_request(:describe_regions) response.region_info.each do |r| region = Region.new(r.region_name, :endpoint => r.region_endpoint, :config => config) yield(region) end nil end
@private
# File lib/aws/ec2/region_collection.rb, line 44 def member_class Region end