class Apcera::JobsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

bindings_post(binding, opts = {}) click to toggle source

Creates a new binding between a job and a service, or between two jobs (a job link).

@param binding An object that defines the properties of the new binding. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Binding]

# File lib/apcera/api/jobs_api.rb, line 17
def bindings_post(binding, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#bindings_post ..."
  end
  
  
  # verify the required parameter 'binding' is set
  fail "Missing the required parameter 'binding' when calling bindings_post" if binding.nil?
  
  # resource path
  path = "/bindings".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 = @api_client.object_to_http_body(binding)
  

  auth_names = ['authorization']
  result = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Binding')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#bindings_post. Result: #{result.inspect}"
  end
  return result
end
docker_job_check(job, opts = {}) click to toggle source

Checks a Docker job before creation to see if it will be allowed by docker.allow policy. Checks a Docker job before creation to see if it will be allowed by [docker.allow policy](docs.apcera.com/policy/examples/docker/#docker-image-whitelisting). @param job The job object to check. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 322
def docker_job_check(job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#docker_job_check ..."
  end
  
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling docker_job_check" if job.nil?
  
  # resource path
  path = "/jobs/docker-job-check".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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  @api_client.call_api(:POST, 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: JobsApi#docker_job_check"
  end
  return nil
end
docker_jobs_post(job, opts = {}) click to toggle source

Creates a new job from a Docker image. Downloads a Docker image from a registry and creates a job to run it. @param job Docker job object. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [CreateDockerJobResponse]

# File lib/apcera/api/jobs_api.rb, line 267
def docker_jobs_post(job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#docker_jobs_post ..."
  end
  
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling docker_jobs_post" if job.nil?
  
  # resource path
  path = "/jobs/docker".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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  result = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CreateDockerJobResponse')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#docker_jobs_post. Result: #{result.inspect}"
  end
  return result
end
job_uuid_instances_instance_uuid_snapshot_post(uuid, instance_uuid, pkg_fqn, opts = {}) click to toggle source

Creates a snapshot of a instance of a job. Issues a snapshot request to the specified job instance. @param uuid UUID of the job to be snapshotted. @param instance_uuid UUID of the instance to be snapshotted. @param pkg_fqn FQN of snapshot package to return. @param [Hash] opts the optional parameters @option opts [String] :directory Directory of a given job/capsule to snapshot. @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 75
def job_uuid_instances_instance_uuid_snapshot_post(uuid, instance_uuid, pkg_fqn, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#job_uuid_instances_instance_uuid_snapshot_post ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling job_uuid_instances_instance_uuid_snapshot_post" if uuid.nil?
  
  # verify the required parameter 'instance_uuid' is set
  fail "Missing the required parameter 'instance_uuid' when calling job_uuid_instances_instance_uuid_snapshot_post" if instance_uuid.nil?
  
  # verify the required parameter 'pkg_fqn' is set
  fail "Missing the required parameter 'pkg_fqn' when calling job_uuid_instances_instance_uuid_snapshot_post" if pkg_fqn.nil?
  
  # resource path
  path = "/job/{uuid}/instances/{instance_uuid}/snapshot".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s).sub('{' + 'instance_uuid' + '}', instance_uuid.to_s)

  # query parameters
  query_params = {}
  query_params[:'pkgFQN'] = pkg_fqn
  query_params[:'directory'] = opts[:'directory'] if opts[:'directory']

  # 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(:POST, 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: JobsApi#job_uuid_instances_instance_uuid_snapshot_post"
  end
  return nil
end
jobs_get(opts = {}) click to toggle source

List jobs. Returns a list of jobs, optionally filtered by one or more query parameters. @param [Hash] opts the optional parameters @option opts [String] :authorization @option opts [Array<String>] :tag List of tags. Only jobs with the specified tags are returned. @option opts [Array<String>] :ids List of job UUIDs. Only jobs with the specified UUIDs are returned. @option opts [String] :name Local name of job(s) to return. @option opts [String] :fqn FQN of job to return. @option opts [String] :match_partial_fqn If `true`, jobs that partially match the specified FQN are returned. @option opts [String] :package_id Return jobs that use the package specified by UUID. @option opts [String] :binding_fqn Filter jobs with a specific binding FQN. @option opts [String] :provider_fqn Return jobs bound to services on the specified provider. @option opts [String] :service_fqn Return jobs bound to the specified service. @option opts [String] :count Limits the number of jobs returned in the response. By default, all jobs are returned. @option opts [String] :page Specifies the number of the results page to fetch. By default, the first page of results is returned. @option opts [String] :health If `true`, the response includes health metrics for the job. @return [Array<Job>]

# File lib/apcera/api/jobs_api.rb, line 148
def jobs_get(opts = {})

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

  # query parameters
  query_params = {}
  query_params[:'tag'] = opts[:'tag'] if opts[:'tag']
  query_params[:'ids'] = opts[:'ids'] if opts[:'ids']
  query_params[:'name'] = opts[:'name'] if opts[:'name']
  query_params[:'fqn'] = opts[:'fqn'] if opts[:'fqn']
  query_params[:'matchPartialFQN'] = opts[:'match_partial_fqn'] if opts[:'match_partial_fqn']
  query_params[:'package_id'] = opts[:'package_id'] if opts[:'package_id']
  query_params[:'BindingFQN'] = opts[:'binding_fqn'] if opts[:'binding_fqn']
  query_params[:'ProviderFQN'] = opts[:'provider_fqn'] if opts[:'provider_fqn']
  query_params[:'ServiceFQN'] = opts[:'service_fqn'] if opts[:'service_fqn']
  query_params[:'count'] = opts[:'count'] if opts[:'count']
  query_params[:'page'] = opts[:'page'] if opts[:'page']
  query_params[:'health'] = opts[:'health'] if opts[:'health']

  # 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<Job>')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_get. Result: #{result.inspect}"
  end
  return result
end
jobs_health_get(ids, opts = {}) click to toggle source

Retrieves health information for a job with a specific UUID. If a job UUID is supplied that corresponds to a deleted or non-running job, or the user does not have &#39;permit read&#39; on the job that they requested health for, the health score will not be in the result. @param ids List of job UUIDs separated by commas. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [JobHealth]

# File lib/apcera/api/jobs_api.rb, line 376
def jobs_health_get(ids, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_health_get ..."
  end
  
  
  # verify the required parameter 'ids' is set
  fail "Missing the required parameter 'ids' when calling jobs_health_get" if ids.nil?
  
  # resource path
  path = "/jobs/health".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'ids'] = ids

  # 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 => 'JobHealth')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_health_get. Result: #{result.inspect}"
  end
  return result
end
jobs_post(job, opts = {}) click to toggle source

Creates a new job. Creates a new job from the Job object passed in the POST body. The only required property in the request object is `fqn` ([Fully Qualified Name](docs.apcera.com/reference/glossary/#fqn)). @param job An object that defines the properties of the new job. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Job]

# File lib/apcera/api/jobs_api.rb, line 212
def jobs_post(job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_post ..."
  end
  
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling jobs_post" if job.nil?
  
  # resource path
  path = "/jobs".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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  result = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Job')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_post. Result: #{result.inspect}"
  end
  return result
end
jobs_routes_endpoint_get(endpoint, opts = {}) click to toggle source

Returns a map of the specified endpoint to an array of job UUIDs that are assigned to the endpoint.

@param endpoint Base64-encoded endpoint URL. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Hash<String, Array<String>>]

# File lib/apcera/api/jobs_api.rb, line 483
def jobs_routes_endpoint_get(endpoint, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_routes_endpoint_get ..."
  end
  
  
  # verify the required parameter 'endpoint' is set
  fail "Missing the required parameter 'endpoint' when calling jobs_routes_endpoint_get" if endpoint.nil?
  
  # resource path
  path = "/jobs/routes/{endpoint}".sub('{format}','json').sub('{' + 'endpoint' + '}', endpoint.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']
  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 => 'Hash<String, Array<String>>')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_routes_endpoint_get. Result: #{result.inspect}"
  end
  return result
end
jobs_routes_get(opts = {}) click to toggle source

Returns a list of all route endpoints that each map to an array of job UUIDs assigned to the endpoint. Returns a list of job routes. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Hash<String, Array<String>>]

# File lib/apcera/api/jobs_api.rb, line 431
def jobs_routes_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_routes_get ..."
  end
  
  
  # resource path
  path = "/jobs/routes".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 => 'Hash<String, Array<String>>')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_routes_get. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_compliance_get(uuid, opts = {}) click to toggle source

Checks the specified job for policy compliance. Checks the specified job for policy compliance. It checks job routes, bindings, resources, etc. for any violations according to current policy. @param uuid UUID of the job to check for compliance. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 706
def jobs_uuid_compliance_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_compliance_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_compliance_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/compliance".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(: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: JobsApi#jobs_uuid_compliance_get"
  end
  return nil
end
jobs_uuid_delete(uuid, opts = {}) click to toggle source

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

# File lib/apcera/api/jobs_api.rb, line 652
def jobs_uuid_delete(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_delete ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_delete" if uuid.nil?
  
  # resource path
  path = "/jobs/{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: JobsApi#jobs_uuid_delete"
  end
  return nil
end
jobs_uuid_files_path_get(uuid, path, opts = {}) click to toggle source

Returns information about an instance&#39;s underlying file system. Returns information about an instance&#39;s underlying file system. @param uuid UUID of the job whose file system information should be retrieved. @param path The path to the root folder for which to generate the folder/file listing. For example, `/jobs/&lt;uuid&gt;/files/` returns a listing for the instance&#39;s root folder, and `/jobs/&lt;uuid&gt;/files/app` returns a list of the instance&#39;s `/app` folder. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Array<FileListing>]

# File lib/apcera/api/jobs_api.rb, line 761
def jobs_uuid_files_path_get(uuid, path, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_files_path_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_files_path_get" if uuid.nil?
  
  # verify the required parameter 'path' is set
  fail "Missing the required parameter 'path' when calling jobs_uuid_files_path_get" if path.nil?
  
  # resource path
  path = "/jobs/{uuid}/files/{path}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s).sub('{' + 'path' + '}', path.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']
  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<FileListing>')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_files_path_get. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_get(uuid, opts = {}) click to toggle source

Returns details about the specified job. Returns details about the specified job. @param uuid UUID of the job to fetch. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Job]

# File lib/apcera/api/jobs_api.rb, line 538
def jobs_uuid_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{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']
  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 => 'Job')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_get. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_instances_get(uuid, opts = {}) click to toggle source

Returns instances from the health manager for a given job UUID. Returns instances from the health manager for a given job UUID. @param uuid UUID of the job. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 819
def jobs_uuid_instances_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_instances_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_instances_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/instances".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(: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: JobsApi#jobs_uuid_instances_get"
  end
  return nil
end
jobs_uuid_instances_instance_uuid_delete(uuid, instance_uuid, opts = {}) click to toggle source

Stop a given instance of a job. Issues a stop request to the specified job instance. @param uuid UUID of the job. @param instance_uuid UUID of the job instance to stop. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 874
def jobs_uuid_instances_instance_uuid_delete(uuid, instance_uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_instances_instance_uuid_delete ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_instances_instance_uuid_delete" if uuid.nil?
  
  # verify the required parameter 'instance_uuid' is set
  fail "Missing the required parameter 'instance_uuid' when calling jobs_uuid_instances_instance_uuid_delete" if instance_uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/instances/{instance_uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s).sub('{' + 'instance_uuid' + '}', instance_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: JobsApi#jobs_uuid_instances_instance_uuid_delete"
  end
  return nil
end
jobs_uuid_logs_drains_drain_uuid_delete(uuid, drain_uuid, opts = {}) click to toggle source

Deletes a log drain from a job. Deletes the specified log drain from the specified job. @param uuid UUID of the job with the log drain to delete. @param drain_uuid UUID of the log drain to delete. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Drain]

# File lib/apcera/api/jobs_api.rb, line 1098
def jobs_uuid_logs_drains_drain_uuid_delete(uuid, drain_uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_logs_drains_drain_uuid_delete ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_logs_drains_drain_uuid_delete" if uuid.nil?
  
  # verify the required parameter 'drain_uuid' is set
  fail "Missing the required parameter 'drain_uuid' when calling jobs_uuid_logs_drains_drain_uuid_delete" if drain_uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/logs/drains/{drain_uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s).sub('{' + 'drain_uuid' + '}', drain_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']
  result = @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,
    :return_type => 'Drain')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_logs_drains_drain_uuid_delete. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_logs_drains_get(uuid, opts = {}) click to toggle source

Returns all log drains for the specified job. Returns all configured log drains for the specified job. @param uuid UUID of the job to retrieve log drains for. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Drain]

# File lib/apcera/api/jobs_api.rb, line 986
def jobs_uuid_logs_drains_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_logs_drains_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_logs_drains_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/logs/drains".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']
  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 => 'Drain')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_logs_drains_get. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_logs_drains_post(uuid, opts = {}) click to toggle source

Creates a log drain on the specified job. Creates a log drain on the specified job from the `drain` parameter in the request body. @param uuid UUID of the job. @param [Hash] opts the optional parameters @option opts [Drain] :drain Drain object to add to job. @option opts [String] :authorization @return [Drain]

# File lib/apcera/api/jobs_api.rb, line 1042
def jobs_uuid_logs_drains_post(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_logs_drains_post ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_logs_drains_post" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/logs/drains".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 = @api_client.object_to_http_body(opts[:'drain'])
  

  auth_names = ['authorization']
  result = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Drain')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_logs_drains_post. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_logs_get(uuid, opts = {}) click to toggle source

Returns logs for the specified job. Returns logs for the specified job. @param uuid UUID of the job to retrieve logs for. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [String]

# File lib/apcera/api/jobs_api.rb, line 931
def jobs_uuid_logs_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_logs_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_logs_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/logs".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']
  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 => 'String')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_logs_get. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_put(uuid, job, opts = {}) click to toggle source

Updates a job. Updates the specified job. @param uuid UUID of the job to update. @param job A JSON object describing the full job object to update, including new values for any properties to update on the job. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Job]

# File lib/apcera/api/jobs_api.rb, line 594
def jobs_uuid_put(uuid, job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_put ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_put" if uuid.nil?
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling jobs_uuid_put" if job.nil?
  
  # resource path
  path = "/jobs/{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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  result = @api_client.call_api(:PUT, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Job')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#jobs_uuid_put. Result: #{result.inspect}"
  end
  return result
end
jobs_uuid_tunnel_get(uuid, opts = {}) click to toggle source

Creates a bi-directional tunnel with the job/instance UUID specified. Creates a bi-directional tunnel with the job/instance UUID specified. @param uuid UUID of the job. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 1156
def jobs_uuid_tunnel_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_tunnel_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_tunnel_get" if uuid.nil?
  
  # resource path
  path = "/jobs/{uuid}/tunnel".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(: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: JobsApi#jobs_uuid_tunnel_get"
  end
  return nil
end
jobs_uuid_tunnel_instance_id_get(uuid, instance_id, opts = {}) click to toggle source

Creates a bi-directional tunnel with the job/instance UUID specified. Creates a bi-directional tunnel with the job/instance UUID specified. @param uuid UUID of the job. @param instance_id UUID of the job instance. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 1211
def jobs_uuid_tunnel_instance_id_get(uuid, instance_id, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#jobs_uuid_tunnel_instance_id_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling jobs_uuid_tunnel_instance_id_get" if uuid.nil?
  
  # verify the required parameter 'instance_id' is set
  fail "Missing the required parameter 'instance_id' when calling jobs_uuid_tunnel_instance_id_get" if instance_id.nil?
  
  # resource path
  path = "/jobs/{uuid}/tunnel/{instance_id}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s).sub('{' + 'instance_id' + '}', instance_id.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: JobsApi#jobs_uuid_tunnel_instance_id_get"
  end
  return nil
end
tasks_uuid_get(uuid, opts = {}) click to toggle source

Returns a list of task events for a given task. Returns the requested Task, which contains a list of task events. A client can poll this endpoint to check the status of a task. Optionally, a client can request a websocket connection over which tasks are streamed in real-time. @param uuid UUID of task. @param [Hash] opts the optional parameters @option opts [String] :authorization @option opts [String] :time If specified, only task events that occurred after the specified time are returned. If not specified, all task events are returned. @option opts [String] :upgrade Header required to upgrade connection to websocket. Value must be &#39;websocket&#39;. @option opts [String] :connection Header required to upgrade connection to websocket. Value must be &#39;Upgrade&#39;. @option opts [String] :sec_web_socket_key Header required to upgrade connection to websocket. Value is base64-encoded random bytes. @return [Task]

# File lib/apcera/api/jobs_api.rb, line 1272
def tasks_uuid_get(uuid, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#tasks_uuid_get ..."
  end
  
  
  # verify the required parameter 'uuid' is set
  fail "Missing the required parameter 'uuid' when calling tasks_uuid_get" if uuid.nil?
  
  # resource path
  path = "/tasks/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)

  # query parameters
  query_params = {}
  query_params[:'time'] = opts[:'time'] if opts[:'time']

  # 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']
  header_params[:'Upgrade'] = opts[:'upgrade'] if opts[:'upgrade']
  header_params[:'Connection'] = opts[:'connection'] if opts[:'connection']
  header_params[:'Sec-WebSocket-Key'] = opts[:'sec_web_socket_key'] if opts[:'sec_web_socket_key']

  # 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 => 'Task')
  if Configuration.debugging
    Configuration.logger.debug "API called: JobsApi#tasks_uuid_get. Result: #{result.inspect}"
  end
  return result
end
unbind_post(job, opts = {}) click to toggle source

Removes a service binding from a job. Removes a service binding from a job. @param job An object that specifies the job and service to unbind. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 1331
def unbind_post(job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#unbind_post ..."
  end
  
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling unbind_post" if job.nil?
  
  # resource path
  path = "/unbind".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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  @api_client.call_api(:POST, 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: JobsApi#unbind_post"
  end
  return nil
end
unlink_post(job, opts = {}) click to toggle source

Removes a link between two jobs. Removes a link between two jobs. The binding record is only removed from the `from_job` property of the request object. @param job An object that specifies the two jobs to link and the port to use on the target job. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [nil]

# File lib/apcera/api/jobs_api.rb, line 1385
def unlink_post(job, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: JobsApi#unlink_post ..."
  end
  
  
  # verify the required parameter 'job' is set
  fail "Missing the required parameter 'job' when calling unlink_post" if job.nil?
  
  # resource path
  path = "/unlink".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 = @api_client.object_to_http_body(job)
  

  auth_names = ['authorization']
  @api_client.call_api(:POST, 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: JobsApi#unlink_post"
  end
  return nil
end