lib/datadog_api_client/v2/api/key_management_api.rb
# Delete an API key
# Delete an API key.
# @param api_key_id [String] The ID of the API key.
# @param opts [Hash] the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
Delete an API key
Delete an API key.
Delete an API key Delete an API key .
def delete_api_key_with_http_info(api_key_id, opts = {})
      if @api_client.config.unstable_operations.has_key?(:delete_api_key)
        unstable_enabled = @api_client.config.unstable_operations[:delete_api_key]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_api_key")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_api_key"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: KeyManagementAPI.delete_api_key ...'
      end
      if @api_client.config.client_side_validation && api_key_id.nil?
        fail ArgumentError, "Missing the required parameter 'api_key_id' when calling KeyManagementAPI.delete_api_key"
      end
      local_var_path = '/api/v2/api_keys/{api_key_id}'.sub('{api_key_id}', CGI.escape(api_key_id.to_s).gsub('%2F', '/'))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type]
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
      new_options = opts.merge(
        :operation => :delete_api_key,
        :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: KeyManagementAPI#delete_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def delete_api_key_with_http_info ( api_key_id , opts = { } ) if @api_client . config . unstable_operations . has_key? ( :delete_api_key ) unstable_enabled = @api_client . config . unstable_operations [ :delete_api_key ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "delete_api_key" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "delete_api_key" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: KeyManagementAPI.delete_api_key ...' end if @api_client . config . client_side_validation && api_key_id . nil? fail ArgumentError , "Missing the required parameter 'api_key_id' when calling KeyManagementAPI.delete_api_key" end local_var_path = '/api/v2/api_keys/{api_key_id}' . sub ( '{api_key_id}' , CGI . escape ( api_key_id . to_s ) . gsub ( '%2F' , '/' ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ '*/*' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ] new_options = opts . merge ( :operation => :delete_api_key , :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: KeyManagementAPI#delete_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Delete an API key
Delete an API key.
Delete an API key Delete an API key .
# verify the required parameter 'api_key_id' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
nil, response status code and response headers
nil response status code and response headers
Array<(nil, Integer, Hash)>
api_key_id
The ID of the API key.
The ID of the API key .
opts
the optional parameters
the optional parameters