class Nodeum::CloudConnectorsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_cloud_connector(cloud_connector_body, opts = {}) click to toggle source

Creates a new cloud connector. **API Key Scope**: cloud_connectors / create @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [CloudConnector]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 27
def create_cloud_connector(cloud_connector_body, opts = {})
  data, _status_code, _headers = create_cloud_connector_with_http_info(cloud_connector_body, opts)
  data
end
create_cloud_connector_with_http_info(cloud_connector_body, opts = {}) click to toggle source

Creates a new cloud connector. **API Key Scope**: cloud_connectors / create @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [Array<(CloudConnector, Integer, Hash)>] CloudConnector data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 37
def create_cloud_connector_with_http_info(cloud_connector_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.create_cloud_connector ...'
  end
  # verify the required parameter 'cloud_connector_body' is set
  if @api_client.config.client_side_validation && cloud_connector_body.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_body' when calling CloudConnectorsApi.create_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(cloud_connector_body) 

  # return_type
  return_type = opts[:return_type] || 'CloudConnector' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#create_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
destroy_cloud_connector(cloud_connector_id, opts = {}) click to toggle source

Destroys a specific cloud connector. **API Key Scope**: cloud_connectors / destroy @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param [Hash] opts the optional parameters @return [nil]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 91
def destroy_cloud_connector(cloud_connector_id, opts = {})
  destroy_cloud_connector_with_http_info(cloud_connector_id, opts)
  nil
end
destroy_cloud_connector_with_http_info(cloud_connector_id, opts = {}) click to toggle source

Destroys a specific cloud connector. **API Key Scope**: cloud_connectors / destroy @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 101
def destroy_cloud_connector_with_http_info(cloud_connector_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.destroy_cloud_connector ...'
  end
  # verify the required parameter 'cloud_connector_id' is set
  if @api_client.config.client_side_validation && cloud_connector_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_id' when calling CloudConnectorsApi.destroy_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors/{cloud_connector_id}'.sub('{' + 'cloud_connector_id' + '}', CGI.escape(cloud_connector_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#destroy_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
index_cloud_connectors(opts = {}) click to toggle source

Lists all cloud connectors. **API Key Scope**: cloud_connectors / index Optional API Key Explicit Scope: cloud_connectors / get_secret_key @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :url Filter on url @option opts [String] :url_proxy Filter on url proxy @option opts [String] :provider Filter on provider @option opts [String] :region Filter on region @option opts [String] :access_key Filter on access key @return [CloudConnectorCollection]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 160
def index_cloud_connectors(opts = {})
  data, _status_code, _headers = index_cloud_connectors_with_http_info(opts)
  data
end
index_cloud_connectors_with_http_info(opts = {}) click to toggle source

Lists all cloud connectors. **API Key Scope**: cloud_connectors / index Optional API Key Explicit Scope: cloud_connectors / get_secret_key @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :url Filter on url @option opts [String] :url_proxy Filter on url proxy @option opts [String] :provider Filter on provider @option opts [String] :region Filter on region @option opts [String] :access_key Filter on access key @return [Array<(CloudConnectorCollection, Integer, Hash)>] CloudConnectorCollection data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 179
def index_cloud_connectors_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.index_cloud_connectors ...'
  end
  # resource path
  local_var_path = '/cloud_connectors'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_by'] = @api_client.build_collection_param(opts[:'sort_by'], :pipe) if !opts[:'sort_by'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
  query_params[:'url_proxy'] = opts[:'url_proxy'] if !opts[:'url_proxy'].nil?
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil?
  query_params[:'access_key'] = opts[:'access_key'] if !opts[:'access_key'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CloudConnectorCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#index_cloud_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
show_cloud_connector(cloud_connector_id, opts = {}) click to toggle source

Displays a specific cloud connector. **API Key Scope**: cloud_connectors / show Optional API Key Explicit Scope: cloud_connectors / get_secret_key @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param [Hash] opts the optional parameters @return [CloudConnector]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 237
def show_cloud_connector(cloud_connector_id, opts = {})
  data, _status_code, _headers = show_cloud_connector_with_http_info(cloud_connector_id, opts)
  data
end
show_cloud_connector_with_http_info(cloud_connector_id, opts = {}) click to toggle source

Displays a specific cloud connector. **API Key Scope**: cloud_connectors / show Optional API Key Explicit Scope: cloud_connectors / get_secret_key @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param [Hash] opts the optional parameters @return [Array<(CloudConnector, Integer, Hash)>] CloudConnector data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 247
def show_cloud_connector_with_http_info(cloud_connector_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.show_cloud_connector ...'
  end
  # verify the required parameter 'cloud_connector_id' is set
  if @api_client.config.client_side_validation && cloud_connector_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_id' when calling CloudConnectorsApi.show_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors/{cloud_connector_id}'.sub('{' + 'cloud_connector_id' + '}', CGI.escape(cloud_connector_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CloudConnector' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#show_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
test_cloud_connector(cloud_connector_body, opts = {}) click to toggle source

Test an unsaved cloud connector. **API Key Scope**: cloud_connectors / test @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [ActiveJobStatus]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 299
def test_cloud_connector(cloud_connector_body, opts = {})
  data, _status_code, _headers = test_cloud_connector_with_http_info(cloud_connector_body, opts)
  data
end
test_cloud_connector_with_http_info(cloud_connector_body, opts = {}) click to toggle source

Test an unsaved cloud connector. **API Key Scope**: cloud_connectors / test @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus, Integer, Hash)>] ActiveJobStatus data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 309
def test_cloud_connector_with_http_info(cloud_connector_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.test_cloud_connector ...'
  end
  # verify the required parameter 'cloud_connector_body' is set
  if @api_client.config.client_side_validation && cloud_connector_body.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_body' when calling CloudConnectorsApi.test_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors/-/test'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'queued', 'working', 'failed'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(cloud_connector_body) 

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#test_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
test_result_cloud_connector(job_id, opts = {}) click to toggle source

Check result of cloud connector test job. **API Key Scope**: cloud_connectors / test @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [CloudBucketSimpleCollection]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 363
def test_result_cloud_connector(job_id, opts = {})
  data, _status_code, _headers = test_result_cloud_connector_with_http_info(job_id, opts)
  data
end
test_result_cloud_connector_with_http_info(job_id, opts = {}) click to toggle source

Check result of cloud connector test job. **API Key Scope**: cloud_connectors / test @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(CloudBucketSimpleCollection, Integer, Hash)>] CloudBucketSimpleCollection data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 373
def test_result_cloud_connector_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.test_result_cloud_connector ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling CloudConnectorsApi.test_result_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors/-/test'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'job_id'] = job_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'queued', 'working', 'failed', ])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CloudBucketSimpleCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#test_result_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_cloud_connector(cloud_connector_id, cloud_connector_body, opts = {}) click to toggle source

Updates a specific cloud connector. **API Key Scope**: cloud_connectors / update @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [CloudConnector]

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 427
def update_cloud_connector(cloud_connector_id, cloud_connector_body, opts = {})
  data, _status_code, _headers = update_cloud_connector_with_http_info(cloud_connector_id, cloud_connector_body, opts)
  data
end
update_cloud_connector_with_http_info(cloud_connector_id, cloud_connector_body, opts = {}) click to toggle source

Updates a specific cloud connector. **API Key Scope**: cloud_connectors / update @param cloud_connector_id [String] Numeric ID or name of cloud connector. @param cloud_connector_body [CloudConnector] @param [Hash] opts the optional parameters @return [Array<(CloudConnector, Integer, Hash)>] CloudConnector data, response status code and response headers

# File lib/nodeum_sdk/api/cloud_connectors_api.rb, line 438
def update_cloud_connector_with_http_info(cloud_connector_id, cloud_connector_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudConnectorsApi.update_cloud_connector ...'
  end
  # verify the required parameter 'cloud_connector_id' is set
  if @api_client.config.client_side_validation && cloud_connector_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_id' when calling CloudConnectorsApi.update_cloud_connector"
  end
  # verify the required parameter 'cloud_connector_body' is set
  if @api_client.config.client_side_validation && cloud_connector_body.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_connector_body' when calling CloudConnectorsApi.update_cloud_connector"
  end
  # resource path
  local_var_path = '/cloud_connectors/{cloud_connector_id}'.sub('{' + 'cloud_connector_id' + '}', CGI.escape(cloud_connector_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(cloud_connector_body) 

  # return_type
  return_type = opts[:return_type] || 'CloudConnector' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudConnectorsApi#update_cloud_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end