Module: Idcf::Ilb::ClientExtensions::Log

Included in:
Idcf::Ilb::Client
Defined in:
lib/idcf/ilb/client_extensions/log.rb

Overview

SDK APIs for log resource

Instance Method Summary collapse

Instance Method Details

#list_logs(attributes = {}, headers = {}) ⇒ Response

Get list of logs

Parameters:

  • attributes (Hash) (defaults to: {})

    request attributes

  • headers (Hash) (defaults to: {})

    HTTP request headers

Options Hash (attributes):

  • :page (Integer) — default: optional
  • :per_page (Integer) — default: optional

Returns:



13
14
15
16
# File 'lib/idcf/ilb/client_extensions/log.rb', line 13

def list_logs(attributes = {}, headers = {})
  Validators::Log.validate_attributes!(attributes, :list)
  get!("logs", attributes, headers)
end

#logs(headers = {}) ⇒ Array<Resources::Log>

Get an array of existing log objects.

Parameters:

  • headers (Hash) (defaults to: {})

    HTTP request headers

Returns:



22
23
24
25
26
# File 'lib/idcf/ilb/client_extensions/log.rb', line 22

def logs(headers = {})
  list_logs({}, headers).resources.map do |log|
    Resources::Log.new(self, log)
  end
end