class DatadogAPIClient::V1::LogsPipelinesAPI

Attributes

api_client[RW]

Public Class Methods

new(api_client = APIClient.default) click to toggle source
# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 22
def initialize(api_client = APIClient.default)
  @api_client = api_client
end

Public Instance Methods

create_logs_pipeline(body, opts = {}) click to toggle source

Create a pipeline Create a pipeline in your organization. @param body [LogsPipeline] Definition of the new pipeline. @param [Hash] opts the optional parameters @return [LogsPipeline]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 30
def create_logs_pipeline(body, opts = {})
  data, _status_code, _headers = create_logs_pipeline_with_http_info(body, opts)
  data
end
create_logs_pipeline_with_http_info(body, opts = {}) click to toggle source

Create a pipeline Create a pipeline in your organization. @param body [LogsPipeline] Definition of the new pipeline. @param [Hash] opts the optional parameters @return [Array<(LogsPipeline, Integer, Hash)>] LogsPipeline data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 40
def create_logs_pipeline_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:create_logs_pipeline)
    unstable_enabled = @api_client.config.unstable_operations[:create_logs_pipeline]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "create_logs_pipeline")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_logs_pipeline"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.create_logs_pipeline ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling LogsPipelinesAPI.create_logs_pipeline"
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipelines'

  # 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[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'LogsPipeline'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_logs_pipeline,
    :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: LogsPipelinesAPI#create_logs_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_logs_pipeline(pipeline_id, opts = {}) click to toggle source

Delete a pipeline Delete a given pipeline from your organization. This endpoint takes no JSON arguments. @param pipeline_id [String] ID of the pipeline to delete. @param [Hash] opts the optional parameters @return [nil]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 105
def delete_logs_pipeline(pipeline_id, opts = {})
  delete_logs_pipeline_with_http_info(pipeline_id, opts)
  nil
end
delete_logs_pipeline_with_http_info(pipeline_id, opts = {}) click to toggle source

Delete a pipeline Delete a given pipeline from your organization. This endpoint takes no JSON arguments. @param pipeline_id [String] ID of the pipeline to delete. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 115
def delete_logs_pipeline_with_http_info(pipeline_id, opts = {})

  if @api_client.config.unstable_operations.has_key?(:delete_logs_pipeline)
    unstable_enabled = @api_client.config.unstable_operations[:delete_logs_pipeline]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_logs_pipeline")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_logs_pipeline"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.delete_logs_pipeline ...'
  end
  # verify the required parameter 'pipeline_id' is set
  if @api_client.config.client_side_validation && pipeline_id.nil?
    fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling LogsPipelinesAPI.delete_logs_pipeline"
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipelines/{pipeline_id}'.sub('{' + 'pipeline_id' + '}', CGI.escape(pipeline_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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_logs_pipeline,
    :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: LogsPipelinesAPI#delete_logs_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_logs_pipeline(pipeline_id, opts = {}) click to toggle source

Get a pipeline Get a specific pipeline from your organization. This endpoint takes no JSON arguments. @param pipeline_id [String] ID of the pipeline to get. @param [Hash] opts the optional parameters @return [LogsPipeline]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 178
def get_logs_pipeline(pipeline_id, opts = {})
  data, _status_code, _headers = get_logs_pipeline_with_http_info(pipeline_id, opts)
  data
end
get_logs_pipeline_order(opts = {}) click to toggle source

Get pipeline order Get the current order of your pipelines. This endpoint takes no JSON arguments. @param [Hash] opts the optional parameters @return [LogsPipelinesOrder]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 250
def get_logs_pipeline_order(opts = {})
  data, _status_code, _headers = get_logs_pipeline_order_with_http_info(opts)
  data
end
get_logs_pipeline_order_with_http_info(opts = {}) click to toggle source

Get pipeline order Get the current order of your pipelines. This endpoint takes no JSON arguments. @param [Hash] opts the optional parameters @return [Array<(LogsPipelinesOrder, Integer, Hash)>] LogsPipelinesOrder data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 259
def get_logs_pipeline_order_with_http_info(opts = {})

  if @api_client.config.unstable_operations.has_key?(:get_logs_pipeline_order)
    unstable_enabled = @api_client.config.unstable_operations[:get_logs_pipeline_order]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "get_logs_pipeline_order")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_logs_pipeline_order"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.get_logs_pipeline_order ...'
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipeline-order'

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LogsPipelinesOrder'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_logs_pipeline_order,
    :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: LogsPipelinesAPI#get_logs_pipeline_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_logs_pipeline_with_http_info(pipeline_id, opts = {}) click to toggle source

Get a pipeline Get a specific pipeline from your organization. This endpoint takes no JSON arguments. @param pipeline_id [String] ID of the pipeline to get. @param [Hash] opts the optional parameters @return [Array<(LogsPipeline, Integer, Hash)>] LogsPipeline data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 188
def get_logs_pipeline_with_http_info(pipeline_id, opts = {})

  if @api_client.config.unstable_operations.has_key?(:get_logs_pipeline)
    unstable_enabled = @api_client.config.unstable_operations[:get_logs_pipeline]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "get_logs_pipeline")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_logs_pipeline"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.get_logs_pipeline ...'
  end
  # verify the required parameter 'pipeline_id' is set
  if @api_client.config.client_side_validation && pipeline_id.nil?
    fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling LogsPipelinesAPI.get_logs_pipeline"
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipelines/{pipeline_id}'.sub('{' + 'pipeline_id' + '}', CGI.escape(pipeline_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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LogsPipeline'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_logs_pipeline,
    :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: LogsPipelinesAPI#get_logs_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_logs_pipelines(opts = {}) click to toggle source

Get all pipelines Get all pipelines from your organization. This endpoint takes no JSON arguments. @param [Hash] opts the optional parameters @return [Array<LogsPipeline>]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 317
def list_logs_pipelines(opts = {})
  data, _status_code, _headers = list_logs_pipelines_with_http_info(opts)
  data
end
list_logs_pipelines_with_http_info(opts = {}) click to toggle source

Get all pipelines Get all pipelines from your organization. This endpoint takes no JSON arguments. @param [Hash] opts the optional parameters @return [Array<(Array<LogsPipeline>, Integer, Hash)>] Array<LogsPipeline> data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 326
def list_logs_pipelines_with_http_info(opts = {})

  if @api_client.config.unstable_operations.has_key?(:list_logs_pipelines)
    unstable_enabled = @api_client.config.unstable_operations[:list_logs_pipelines]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "list_logs_pipelines")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_logs_pipelines"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.list_logs_pipelines ...'
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipelines'

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LogsPipeline>'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_logs_pipelines,
    :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: LogsPipelinesAPI#list_logs_pipelines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_logs_pipeline(pipeline_id, body, opts = {}) click to toggle source

Update a pipeline Update a given pipeline configuration to change it’s processors or their order. Note: Using this method updates your pipeline configuration by replacing your current configuration with the new one sent to your Datadog organization. @param pipeline_id [String] ID of the pipeline to delete. @param body [LogsPipeline] New definition of the pipeline. @param [Hash] opts the optional parameters @return [LogsPipeline]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 386
def update_logs_pipeline(pipeline_id, body, opts = {})
  data, _status_code, _headers = update_logs_pipeline_with_http_info(pipeline_id, body, opts)
  data
end
update_logs_pipeline_order(body, opts = {}) click to toggle source

Update pipeline order Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change the structure and content of the data processed by other pipelines and their processors. Note: Using the `PUT` method updates your pipeline order by replacing your current order with the new one sent to your Datadog organization. @param body [LogsPipelinesOrder] Object containing the new ordered list of pipeline IDs. @param [Hash] opts the optional parameters @return [LogsPipelinesOrder]

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 466
def update_logs_pipeline_order(body, opts = {})
  data, _status_code, _headers = update_logs_pipeline_order_with_http_info(body, opts)
  data
end
update_logs_pipeline_order_with_http_info(body, opts = {}) click to toggle source

Update pipeline order Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change the structure and content of the data processed by other pipelines and their processors. Note: Using the &#x60;PUT&#x60; method updates your pipeline order by replacing your current order with the new one sent to your Datadog organization. @param body [LogsPipelinesOrder] Object containing the new ordered list of pipeline IDs. @param [Hash] opts the optional parameters @return [Array<(LogsPipelinesOrder, Integer, Hash)>] LogsPipelinesOrder data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 476
def update_logs_pipeline_order_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:update_logs_pipeline_order)
    unstable_enabled = @api_client.config.unstable_operations[:update_logs_pipeline_order]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "update_logs_pipeline_order")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_logs_pipeline_order"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.update_logs_pipeline_order ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling LogsPipelinesAPI.update_logs_pipeline_order"
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipeline-order'

  # 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[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'LogsPipelinesOrder'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_logs_pipeline_order,
    :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: LogsPipelinesAPI#update_logs_pipeline_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_logs_pipeline_with_http_info(pipeline_id, body, opts = {}) click to toggle source

Update a pipeline Update a given pipeline configuration to change it’s processors or their order. Note: Using this method updates your pipeline configuration by replacing your current configuration with the new one sent to your Datadog organization. @param pipeline_id [String] ID of the pipeline to delete. @param body [LogsPipeline] New definition of the pipeline. @param [Hash] opts the optional parameters @return [Array<(LogsPipeline, Integer, Hash)>] LogsPipeline data, response status code and response headers

# File lib/datadog_api_client/v1/api/logs_pipelines_api.rb, line 397
def update_logs_pipeline_with_http_info(pipeline_id, body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:update_logs_pipeline)
    unstable_enabled = @api_client.config.unstable_operations[:update_logs_pipeline]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "update_logs_pipeline")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_logs_pipeline"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LogsPipelinesAPI.update_logs_pipeline ...'
  end
  # verify the required parameter 'pipeline_id' is set
  if @api_client.config.client_side_validation && pipeline_id.nil?
    fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling LogsPipelinesAPI.update_logs_pipeline"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling LogsPipelinesAPI.update_logs_pipeline"
  end
  # resource path
  local_var_path = '/api/v1/logs/config/pipelines/{pipeline_id}'.sub('{' + 'pipeline_id' + '}', CGI.escape(pipeline_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[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'LogsPipeline'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_logs_pipeline,
    :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: LogsPipelinesAPI#update_logs_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end