class RokkaClientCodegen::StacksApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_stack(stack_definition, organization, name, opts = {}) click to toggle source

Create a new stack.

@param stack_definition Stack operations and options definition. See rokka.io/documentation/references/stacks.html for explanations how to define stacks. @param organization @param name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :overwrite Whether to overwrite the stack if it already exists (default to false) @return [Stack]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 31
def create_stack(stack_definition, organization, name, opts = {})
  data, _status_code, _headers = create_stack_with_http_info(stack_definition, organization, name, opts)
  return data
end
create_stack_with_http_info(stack_definition, organization, name, opts = {}) click to toggle source

Create a new stack.

@param stack_definition Stack operations and options definition. See rokka.io/documentation/references/stacks.html for explanations how to define stacks. @param organization @param name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :overwrite Whether to overwrite the stack if it already exists @return [Array<(Stack, Fixnum, Hash)>] Stack data, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 44
def create_stack_with_http_info(stack_definition, organization, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.create_stack ..."
  end
  # verify the required parameter 'stack_definition' is set
  if @api_client.config.client_side_validation && stack_definition.nil?
    fail ArgumentError, "Missing the required parameter 'stack_definition' when calling StacksApi.create_stack"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling StacksApi.create_stack"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling StacksApi.create_stack, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling StacksApi.create_stack"
  end
  if @api_client.config.client_side_validation && name !~ Regexp.new(/[a-z0-9\\-_]+/)
    fail ArgumentError, "invalid value for 'name' when calling StacksApi.create_stack, must conform to the pattern /[a-z0-9\\-_]+/."
  end

  # resource path
  local_var_path = "/stacks/{organization}/{name}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(stack_definition)
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Stack')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#create_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_stack(organization, name, opts = {}) click to toggle source

Delete a stack.

@param organization @param name @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 103
def delete_stack(organization, name, opts = {})
  delete_stack_with_http_info(organization, name, opts)
  return nil
end
delete_stack_with_http_info(organization, name, opts = {}) click to toggle source

Delete a stack.

@param organization @param name @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 114
def delete_stack_with_http_info(organization, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.delete_stack ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling StacksApi.delete_stack"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling StacksApi.delete_stack, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling StacksApi.delete_stack"
  end
  if @api_client.config.client_side_validation && name !~ Regexp.new(/[a-z0-9\\-_]+/)
    fail ArgumentError, "invalid value for 'name' when calling StacksApi.delete_stack, must conform to the pattern /[a-z0-9\\-_]+/."
  end

  # resource path
  local_var_path = "/stacks/{organization}/{name}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#delete_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stack(organization, name, opts = {}) click to toggle source

Get a single stack.

@param organization @param name @param [Hash] opts the optional parameters @return [Stack]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 167
def get_stack(organization, name, opts = {})
  data, _status_code, _headers = get_stack_with_http_info(organization, name, opts)
  return data
end
get_stack_with_http_info(organization, name, opts = {}) click to toggle source

Get a single stack.

@param organization @param name @param [Hash] opts the optional parameters @return [Array<(Stack, Fixnum, Hash)>] Stack data, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 178
def get_stack_with_http_info(organization, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.get_stack ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling StacksApi.get_stack"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling StacksApi.get_stack, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling StacksApi.get_stack"
  end
  if @api_client.config.client_side_validation && name !~ Regexp.new(/[a-z0-9\\-_]+/)
    fail ArgumentError, "invalid value for 'name' when calling StacksApi.get_stack, must conform to the pattern /[a-z0-9\\-_]+/."
  end

  # resource path
  local_var_path = "/stacks/{organization}/{name}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Stack')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#get_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_operations(opts = {}) click to toggle source

Listing all available operations that can be used in stacks.

@param [Hash] opts the optional parameters @return [Hash<String, StackOperationDescription>]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 230
def list_operations(opts = {})
  data, _status_code, _headers = list_operations_with_http_info(opts)
  return data
end
list_operations_with_http_info(opts = {}) click to toggle source

Listing all available operations that can be used in stacks.

@param [Hash] opts the optional parameters @return [Array<(Hash<String, StackOperationDescription>, Fixnum, Hash)>] Hash<String, StackOperationDescription> data, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 239
def list_operations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.list_operations ..."
  end
  # resource path
  local_var_path = "/operations"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Hash<String, StackOperationDescription>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#list_operations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_stack_options(opts = {}) click to toggle source

List all available options that can be set on stacks.

@param [Hash] opts the optional parameters @return [StackOptions]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 275
def list_stack_options(opts = {})
  data, _status_code, _headers = list_stack_options_with_http_info(opts)
  return data
end
list_stack_options_with_http_info(opts = {}) click to toggle source

List all available options that can be set on stacks.

@param [Hash] opts the optional parameters @return [Array<(StackOptions, Fixnum, Hash)>] StackOptions data, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 284
def list_stack_options_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.list_stack_options ..."
  end
  # resource path
  local_var_path = "/stackoptions"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StackOptions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#list_stack_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_stacks(organization, opts = {}) click to toggle source

Get all stacks of an organization.

@param organization @param [Hash] opts the optional parameters @return [ListStacksResponse]

# File lib/rokka_client_codegen/api/stacks_api.rb, line 321
def list_stacks(organization, opts = {})
  data, _status_code, _headers = list_stacks_with_http_info(organization, opts)
  return data
end
list_stacks_with_http_info(organization, opts = {}) click to toggle source

Get all stacks of an organization.

@param organization @param [Hash] opts the optional parameters @return [Array<(ListStacksResponse, Fixnum, Hash)>] ListStacksResponse data, response status code and response headers

# File lib/rokka_client_codegen/api/stacks_api.rb, line 331
def list_stacks_with_http_info(organization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StacksApi.list_stacks ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling StacksApi.list_stacks"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling StacksApi.list_stacks, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # resource path
  local_var_path = "/stacks/{organization}".sub('{' + 'organization' + '}', organization.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListStacksResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StacksApi#list_stacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end