Method: Fog::Compute::AWS::Real#describe_addresses

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

#describe_addresses(filters = {}) ⇒ Object

Describe all or specified IP addresses.

Parameters

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

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

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

      • ‘addressesSet’<~Array>:

        • ‘instanceId’<~String> - instance for ip address

        • ‘publicIp’<~String> - ip address for instance

Amazon API Reference



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

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