class Apcera::InstancesApi
Attributes
Public Class Methods
# File lib/apcera/api/instances_api.rb, line 7 def initialize(api_client = nil) @api_client = api_client || Configuration.api_client end
Public Instance Methods
Returns a list of instance managers. Returns a list of instance managers. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Array<InstanceManager>]
# File lib/apcera/api/instances_api.rb, line 16 def instance_managers_get(opts = {}) if Configuration.debugging Configuration.logger.debug "Calling API: InstancesApi#instance_managers_get ..." end # resource path path = "/instance_managers".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<InstanceManager>') if Configuration.debugging Configuration.logger.debug "API called: InstancesApi#instance_managers_get. Result: #{result.inspect}" end return result end
Returns details for the specified instance manager. Returns details for the specified instance manager. @param uuid UUID of the instance manager to retrieve details for. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [InstanceManager]
# File lib/apcera/api/instances_api.rb, line 68 def instance_managers_uuid_get(uuid, opts = {}) if Configuration.debugging Configuration.logger.debug "Calling API: InstancesApi#instance_managers_uuid_get ..." end # verify the required parameter 'uuid' is set fail "Missing the required parameter 'uuid' when calling instance_managers_uuid_get" if uuid.nil? # resource path path = "/instance_managers/{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 => 'InstanceManager') if Configuration.debugging Configuration.logger.debug "API called: InstancesApi#instance_managers_uuid_get. Result: #{result.inspect}" end return result end
Returns a list of instances managed by the specified instance manager. Returns a list of instances managed by the specified instance manager. @param uuid UUID of the instance manager whose instances should be retrieved. @param [Hash] opts the optional parameters @option opts [String] :authorization @return [Array<Instances>]
# File lib/apcera/api/instances_api.rb, line 123 def instance_managers_uuid_instances_get(uuid, opts = {}) if Configuration.debugging Configuration.logger.debug "Calling API: InstancesApi#instance_managers_uuid_instances_get ..." end # verify the required parameter 'uuid' is set fail "Missing the required parameter 'uuid' when calling instance_managers_uuid_instances_get" if uuid.nil? # resource path path = "/instance_managers/{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'] 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<Instances>') if Configuration.debugging Configuration.logger.debug "API called: InstancesApi#instance_managers_uuid_instances_get. Result: #{result.inspect}" end return result end