class Apcera::DefaultApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = nil) click to toggle source
# File lib/apcera/api/default_api.rb, line 7
def initialize(api_client = nil)
  @api_client = api_client || Configuration.api_client
end

Public Instance Methods

audit_get(opts = {}) click to toggle source

Returns audit log items for the cluster. Returns a list audit log items. You can optionally filter the list by start time, end time, FQN, or event type. @param [Hash] opts the optional parameters @option opts [Float] :start_time UNIX timestamp. If specified, only events that occurred on or after the specified time are returned in the response. @option opts [Float] :end_time UNIX timestamp. If specified, only events that occurred on or before the specified time are returned in the response. @option opts [String] :fqn If specified, only events on the resource specified by `fqn` are returned in the response. You can also specify an FQN segment, which may include wildcards for the resource type. For example:n * `*::/` returns all audit logs for all resource types.n * `job::/` returns all audit logs for Job resource types. n * `job::/apcera` returns all audit logs for Job resource types in the `/apcera` namespace and its sub-namespaces. n * `*::/apcera` returns all audit logs for all resource types in the `/apcera` namespace its sub-namespaces. @option opts [String] :event_type If specified, only events of the specified type are returned in the response. @option opts [String] :authorization @return [Array<AuditLogItem>]

# File lib/apcera/api/default_api.rb, line 20
def audit_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: DefaultApi#audit_get ..."
  end
  
  
  # resource path
  path = "/audit".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'start_time'] = opts[:'start_time'] if opts[:'start_time']
  query_params[:'end_time'] = opts[:'end_time'] if opts[:'end_time']
  query_params[:'fqn'] = opts[:'fqn'] if opts[:'fqn']
  query_params[:'event_type'] = opts[:'event_type'] if opts[:'event_type']

  # 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<AuditLogItem>')
  if Configuration.debugging
    Configuration.logger.debug "API called: DefaultApi#audit_get. Result: #{result.inspect}"
  end
  return result
end
tasks_uuid_delete(uuid, opts = {}) click to toggle source

Deletes a task. Cancels the specified task. @param uuid UUID of the task delete. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/default_api.rb, line 76
def tasks_uuid_delete(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: DefaultApi#tasks_uuid_delete ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling tasks_uuid_delete" if uuid.nil?
  
  # resource path
  path = "/tasks/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.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(:DELETE, 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: DefaultApi#tasks_uuid_delete"
  end
  return nil
end