lib/datadog_api_client/v1/api/service_level_objectives_api.rb
# Delete an SLO
# Permanently delete the specified service level objective object.
#
# If an SLO is used in a dashboard, the `DELETE /v1/slo/` endpoint returns
# a 409 conflict error because the SLO is referenced in a dashboard.
# @param slo_id [String] The ID of the service level objective.
# @param opts [Hash] the optional parameters
# @option opts [String] :force Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor).
# @return [Array<(SLODeleteResponse, Integer, Hash)>] SLODeleteResponse data, response status code and response headers
Delete an SLO
Permanently delete the specified service level objective object.

If an SLO is used in a dashboard, the `DELETE /v1/slo/` endpoint returns
a 409 conflict error because the SLO is referenced in a dashboard.
Delete an SLO Permanently delete the specified service level objective object . If an SLO is used in a dashboard the ` DELETE / v1 / slo / ` endpoint returns a 409 conflict error because the SLO is referenced in a dashboard .
def delete_slo_with_http_info(slo_id, opts = {})
      if @api_client.config.unstable_operations.has_key?(:delete_slo)
        unstable_enabled = @api_client.config.unstable_operations[:delete_slo]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_slo")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_slo"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.delete_slo ...'
      end
      if @api_client.config.client_side_validation && slo_id.nil?
        fail ArgumentError, "Missing the required parameter 'slo_id' when calling ServiceLevelObjectivesAPI.delete_slo"
      end
      local_var_path = '/api/v1/slo/{slo_id}'.sub('{slo_id}', CGI.escape(slo_id.to_s).gsub('%2F', '/'))
      query_params = opts[:query_params] || {}
      query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'SLODeleteResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
      new_options = opts.merge(
        :operation => :delete_slo,
        :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: ServiceLevelObjectivesAPI#delete_slo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def delete_slo_with_http_info ( slo_id , opts = { } ) if @api_client . config . unstable_operations . has_key? ( :delete_slo ) unstable_enabled = @api_client . config . unstable_operations [ :delete_slo ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "delete_slo" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "delete_slo" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: ServiceLevelObjectivesAPI.delete_slo ...' end if @api_client . config . client_side_validation && slo_id . nil? fail ArgumentError , "Missing the required parameter 'slo_id' when calling ServiceLevelObjectivesAPI.delete_slo" end local_var_path = '/api/v1/slo/{slo_id}' . sub ( '{slo_id}' , CGI . escape ( slo_id . to_s ) . gsub ( '%2F' , '/' ) ) query_params = opts [ :query_params ] || { } query_params [ :' force ' ] = opts [ :' force ' ] if ! opts [ :' force ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'SLODeleteResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ] new_options = opts . merge ( :operation => :delete_slo , :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: ServiceLevelObjectivesAPI#delete_slo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Delete an SLO
Permanently delete the specified service level objective object.
Delete an SLO Permanently delete the specified service level objective object .
# verify the required parameter 'slo_id' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
SLODeleteResponse data, response status code and response headers
SLODeleteResponse data response status code and response headers
Array<(SLODeleteResponse, Integer, Hash)>
slo_id
The ID of the service level objective.
The ID of the service level objective .
opts
:force Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor).
: force Delete the monitor even if it ' s referenced by other resources ( for example SLO composite monitor ) .