Class: Apcera::LogsApi
- Inherits:
-
Object
- Object
- Apcera::LogsApi
- Defined in:
- lib/apcera/api/logs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#audit_logs_get(opts = {}) ⇒ Array<AuditLogItemOld>
Returns audit log items for the cluster.
-
#initialize(api_client = nil) ⇒ LogsApi
constructor
A new instance of LogsApi.
-
#logs_channel_get(channel, opts = {}) ⇒ nil
Streams logs for the specified channel.
Constructor Details
#initialize(api_client = nil) ⇒ LogsApi
Returns a new instance of LogsApi.
7 8 9 |
# File 'lib/apcera/api/logs_api.rb', line 7 def initialize(api_client = nil) @api_client = api_client || Configuration.api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/apcera/api/logs_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#audit_logs_get(opts = {}) ⇒ Array<AuditLogItemOld>
Returns audit log items for the cluster. Returns a list of audit log items.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/apcera/api/logs_api.rb', line 16 def audit_logs_get(opts = {}) if Configuration.debugging Configuration.logger.debug "Calling API: LogsApi#audit_logs_get ..." end # resource path path = "/audit_logs".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = [] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization'] # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['authorization'] result = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AuditLogItemOld>') if Configuration.debugging Configuration.logger.debug "API called: LogsApi#audit_logs_get. Result: #{result.inspect}" end return result end |
#logs_channel_get(channel, opts = {}) ⇒ nil
Streams logs for the specified channel.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/apcera/api/logs_api.rb', line 68 def logs_channel_get(channel, opts = {}) if Configuration.debugging Configuration.logger.debug "Calling API: LogsApi#logs_channel_get ..." end # verify the required parameter 'channel' is set fail "Missing the required parameter 'channel' when calling logs_channel_get" if channel.nil? # resource path path = "/logs/{channel}".sub('{format}','json').sub('{' + 'channel' + '}', channel.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = [] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization'] # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['authorization'] @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if Configuration.debugging Configuration.logger.debug "API called: LogsApi#logs_channel_get" end return nil end |