Method: DatadogAPIClient::V2::KeyManagementAPI#delete_current_user_application_key_with_http_info

Defined in:
lib/datadog_api_client/v2/api/key_management_api.rb

#delete_current_user_application_key_with_http_info(app_key_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an application key owned by current user.

Delete an application key owned by current user

Parameters:

  • app_key_id (String)

    The ID of the application key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/datadog_api_client/v2/api/key_management_api.rb', line 305

def delete_current_user_application_key_with_http_info(app_key_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KeyManagementAPI.delete_current_user_application_key ...'
  end
  # verify the required parameter 'app_key_id' is set
  if @api_client.config.client_side_validation && app_key_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_key_id' when calling KeyManagementAPI.delete_current_user_application_key"
  end
  # resource path
  local_var_path = '/api/v2/current_user/application_keys/{app_key_id}'.sub('{app_key_id}', CGI.escape(app_key_id.to_s).gsub('%2F', '/'))

  # 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(['*/*'])

  # 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_current_user_application_key,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

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