class AWS::EC2::Region


(e.g. “ec2.eu-west-1.amazonaws.com”).
@attr_reader [String] endpoint The endpoint to use for this region<br><br>end<br>h<br>h = region.instances.map(&:id)
ec2.regions.inject({}) do |h,region|
you can do:
{EC2#regions}; for example, to list instance IDs by region,
Region also responds to all of the methods of {EC2} except<br><br>ec2.regions.endpoint
endpoint for a given region:
Represents an EC2 region. You can use this to find the

def eql? other

Returns:
  • (Boolean) -

Parameters:
  • other (Region) --
def eql? other
  other.is_a?(Region) and
  other.name == name and
  other.endpoint == endpoint
end

def exists?

Returns:
  • (Boolean) - True if the region is available for this
def exists?
  client.describe_regions(:region_names => [name])
  true
rescue Errors::InvalidParameterValue
  false
end

def initialize name, options = {}

def initialize name, options = {}
  @name = name
  @endpoint = options[:endpoint] || "ec2.#{name}.amazonaws.com"
  @client = Client.new(options.merge(:endpoint => endpoint))
  @config = @client.config
end