class LaunchDarklyApi::DataExportDestinationsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

delete_destination(proj_key, env_key, id, opts = {}) click to toggle source

Delete Data Export destination Delete Data Export destination by ID @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param [Hash] opts the optional parameters @return [nil]

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 29
def delete_destination(proj_key, env_key, id, opts = {})
  delete_destination_with_http_info(proj_key, env_key, id, opts)
  nil
end
delete_destination_with_http_info(proj_key, env_key, id, opts = {}) click to toggle source

Delete Data Export destination Delete Data Export destination by ID @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 41
def delete_destination_with_http_info(proj_key, env_key, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.delete_destination ...'
  end
  # verify the required parameter 'proj_key' is set
  if @api_client.config.client_side_validation && proj_key.nil?
    fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'env_key' is set
  if @api_client.config.client_side_validation && env_key.nil?
    fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.delete_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projKey}/{envKey}/{id}'.sub('{' + 'projKey' + '}', CGI.escape(proj_key.to_s)).sub('{' + 'envKey' + '}', CGI.escape(env_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

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

Get destination Get a single Data Export destination by ID @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param [Hash] opts the optional parameters @return [Destination]

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 102
def get_destination(proj_key, env_key, id, opts = {})
  data, _status_code, _headers = get_destination_with_http_info(proj_key, env_key, id, opts)
  data
end
get_destination_with_http_info(proj_key, env_key, id, opts = {}) click to toggle source

Get destination Get a single Data Export destination by ID @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param [Hash] opts the optional parameters @return [Array<(Destination, Integer, Hash)>] Destination data, response status code and response headers

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 114
def get_destination_with_http_info(proj_key, env_key, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destination ...'
  end
  # verify the required parameter 'proj_key' is set
  if @api_client.config.client_side_validation && proj_key.nil?
    fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'env_key' is set
  if @api_client.config.client_side_validation && env_key.nil?
    fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.get_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projKey}/{envKey}/{id}'.sub('{' + 'projKey' + '}', CGI.escape(proj_key.to_s)).sub('{' + 'envKey' + '}', CGI.escape(env_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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] || 'Destination'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

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

List destinations Get a list of Data Export destinations configured across all projects and environments. @param [Hash] opts the optional parameters @return [Destinations]

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 174
def get_destinations(opts = {})
  data, _status_code, _headers = get_destinations_with_http_info(opts)
  data
end
get_destinations_with_http_info(opts = {}) click to toggle source

List destinations Get a list of Data Export destinations configured across all projects and environments. @param [Hash] opts the optional parameters @return [Array<(Destinations, Integer, Hash)>] Destinations data, response status code and response headers

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 183
def get_destinations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destinations ...'
  end
  # resource path
  local_var_path = '/api/v2/destinations'

  # 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] || 'Destinations'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"DataExportDestinationsApi.get_destinations",
    :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: DataExportDestinationsApi#get_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_destination(proj_key, env_key, id, patch_operation, opts = {}) click to toggle source

Update Data Export destination Update a Data Export destination. This requires a JSON Patch representation of the modified destination. @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param patch_operation [Array<PatchOperation>] @param [Hash] opts the optional parameters @return [Destination]

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 235
def patch_destination(proj_key, env_key, id, patch_operation, opts = {})
  data, _status_code, _headers = patch_destination_with_http_info(proj_key, env_key, id, patch_operation, opts)
  data
end
patch_destination_with_http_info(proj_key, env_key, id, patch_operation, opts = {}) click to toggle source

Update Data Export destination Update a Data Export destination. This requires a JSON Patch representation of the modified destination. @param proj_key [String] The project key @param env_key [String] The environment key @param id [String] The Data Export destination ID @param patch_operation [Array<PatchOperation>] @param [Hash] opts the optional parameters @return [Array<(Destination, Integer, Hash)>] Destination data, response status code and response headers

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 248
def patch_destination_with_http_info(proj_key, env_key, id, patch_operation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.patch_destination ...'
  end
  # verify the required parameter 'proj_key' is set
  if @api_client.config.client_side_validation && proj_key.nil?
    fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'env_key' is set
  if @api_client.config.client_side_validation && env_key.nil?
    fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'patch_operation' is set
  if @api_client.config.client_side_validation && patch_operation.nil?
    fail ArgumentError, "Missing the required parameter 'patch_operation' when calling DataExportDestinationsApi.patch_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projKey}/{envKey}/{id}'.sub('{' + 'projKey' + '}', CGI.escape(proj_key.to_s)).sub('{' + 'envKey' + '}', CGI.escape(env_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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(patch_operation)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"DataExportDestinationsApi.patch_destination",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#patch_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_destination(proj_key, env_key, destination_post, opts = {}) click to toggle source

Create data export destination Create a new destination. The `config` body parameter represents the configuration parameters required for a destination type. @param proj_key [String] The project key @param env_key [String] The environment key @param destination_post [DestinationPost] @param [Hash] opts the optional parameters @return [Destination]

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 317
def post_destination(proj_key, env_key, destination_post, opts = {})
  data, _status_code, _headers = post_destination_with_http_info(proj_key, env_key, destination_post, opts)
  data
end
post_destination_with_http_info(proj_key, env_key, destination_post, opts = {}) click to toggle source

Create data export destination Create a new destination. The &#x60;config&#x60; body parameter represents the configuration parameters required for a destination type. @param proj_key [String] The project key @param env_key [String] The environment key @param destination_post [DestinationPost] @param [Hash] opts the optional parameters @return [Array<(Destination, Integer, Hash)>] Destination data, response status code and response headers

# File lib/launchdarkly_api/api/data_export_destinations_api.rb, line 329
def post_destination_with_http_info(proj_key, env_key, destination_post, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_destination ...'
  end
  # verify the required parameter 'proj_key' is set
  if @api_client.config.client_side_validation && proj_key.nil?
    fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'env_key' is set
  if @api_client.config.client_side_validation && env_key.nil?
    fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'destination_post' is set
  if @api_client.config.client_side_validation && destination_post.nil?
    fail ArgumentError, "Missing the required parameter 'destination_post' when calling DataExportDestinationsApi.post_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projKey}/{envKey}'.sub('{' + 'projKey' + '}', CGI.escape(proj_key.to_s)).sub('{' + 'envKey' + '}', CGI.escape(env_key.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(destination_post)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

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