Class AWS::EC2::Region
In: lib/aws/ec2/region.rb
Parent: Object

Represents an EC2 region. You can use this to find the endpoint for a given region:

    ec2.regions["us-west-1"].endpoint

Region also responds to all of the methods of {EC2} except {EC2#regions}; for example, to list instance IDs by region, you can do:

    ec2.regions.inject({}) do |h,region|
      h[region.name] = region.instances.map(&:id)
      h
    end

@attr_reader [String] endpoint The endpoint to use for this region

  (e.g. "ec2.eu-west-1.amazonaws.com").

Methods

==   eql?   exists?   new  

Constants

PROXIED_METHODS = [ :instances, :security_groups, :key_pairs, :elastic_ips, :tags, :availability_zones, :images, :volumes, :snapshots, :reserved_instances, :reserved_instances_offerings, :vpcs, :subnets, :network_acls, :route_tables, :network_interfaces, :internet_gateways, :customer_gateways, :vpn_gateways, :dhcp_options, :vpn_connections, :export_tasks, ]

Attributes

client  [R]  @return [Client]
config  [R]  @return [Core::Configuration]
endpoint  [R]  @return [String]
name  [R]  @return [String] The name of the region (e.g. "us-west-2").

Public Class methods

Public Instance methods

==(other)

Alias for eql?

@param [Region] other @return [Boolean]

@return [Boolean] True if the region is available for this

  account.

[Validate]