Method: Fog::Compute::AWS::Real#describe_regions

Defined in:
lib/fog/compute/requests/aws/describe_regions.rb

#describe_regions(filters = {}) ⇒ Object

Describe all or specified regions

Params

  • filters<~Hash> - List of filters to limit results with

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      • ‘requestId’<~String> - Id of request

      • ‘regionInfo’<~Array>:

        • ‘regionName’<~String> - Name of region

        • ‘regionEndpoint’<~String> - Service endpoint for region

Amazon API Reference



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fog/compute/requests/aws/describe_regions.rb', line 22

def describe_regions(filters = {})
  unless filters.is_a?(Hash)
    Formatador.display_line("[yellow][WARN] describe_regions with #{filters.class} param is deprecated, use describe_regions('region-name' => []) instead[/] [light_black](#{caller.first})[/]")
    filters = {'region-name' => [*filters]}
  end
  params = Fog::AWS.indexed_filters(filters)
  request({
    'Action'    => 'DescribeRegions',
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::DescribeRegions.new
  }.merge!(params))
end