Class: AWS::EC2::RegionCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::RegionCollection
- Defined in:
- lib/aws/ec2/region_collection.rb
Overview
Represents all the regions available to your account.
Instance Attribute Summary
Attributes included from Core::Model
Instance Method Summary collapse
-
#[](name) ⇒ Region
The region identified by the given name (e.g. “us-east-1”).
- #each {|Region| ... } ⇒ nil
Methods included from FilteredCollection
#filter, #filtered_request, #initialize
Methods included from Core::Model
#client, #config_prefix, #initialize, #inspect
Instance Method Details
#[](name) ⇒ Region
Returns The region identified by the given name (e.g. “us-east-1”).
38 39 40 |
# File 'lib/aws/ec2/region_collection.rb', line 38 def [](name) super end |
#each {|Region| ... } ⇒ nil
25 26 27 28 29 30 31 32 33 34 |
# 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 |