lib/datadog_api_client/v2/api/metrics_api.rb
# Update a tag configuration
# Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
# of a count, rate, or gauge metric.
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission.
# @param metric_name [String] The name of the metric.
# @param body [MetricTagConfigurationUpdateRequest] 
# @param opts [Hash] the optional parameters
# @return [Array<(MetricTagConfigurationResponse, Integer, Hash)>] MetricTagConfigurationResponse data, response status code and response headers
Update a tag configuration
Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
of a count, rate, or gauge metric.
Can only be used with application keys from users with the `Manage Tags for Metrics` permission.
Update a tag configuration Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations of a count rate or gauge metric . Can only be used with application keys from users with the ` Manage Tags for Metrics ` permission .
def update_tag_configuration_with_http_info(metric_name, body, opts = {})
      if @api_client.config.unstable_operations.has_key?(:update_tag_configuration)
        unstable_enabled = @api_client.config.unstable_operations[:update_tag_configuration]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "update_tag_configuration")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_tag_configuration"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsAPI.update_tag_configuration ...'
      end
      if @api_client.config.client_side_validation && metric_name.nil?
        fail ArgumentError, "Missing the required parameter 'metric_name' when calling MetricsAPI.update_tag_configuration"
      end
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling MetricsAPI.update_tag_configuration"
      end
      local_var_path = '/api/v2/metrics/{metric_name}/tags'.sub('{metric_name}', CGI.escape(metric_name.to_s).gsub('%2F', '/'))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
      return_type = opts[:debug_return_type] || 'MetricTagConfigurationResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
      new_options = opts.merge(
        :operation => :update_tag_configuration,
        :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: MetricsAPI#update_tag_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def update_tag_configuration_with_http_info ( metric_name , body , opts = { } ) if @api_client . config . unstable_operations . has_key? ( :update_tag_configuration ) unstable_enabled = @api_client . config . unstable_operations [ :update_tag_configuration ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "update_tag_configuration" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "update_tag_configuration" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MetricsAPI.update_tag_configuration ...' end if @api_client . config . client_side_validation && metric_name . nil? fail ArgumentError , "Missing the required parameter 'metric_name' when calling MetricsAPI.update_tag_configuration" end if @api_client . config . client_side_validation && body . nil? fail ArgumentError , "Missing the required parameter 'body' when calling MetricsAPI.update_tag_configuration" end local_var_path = '/api/v2/metrics/{metric_name}/tags' . sub ( '{metric_name}' , CGI . escape ( metric_name . to_s ) . gsub ( '%2F' , '/' ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body ) return_type = opts [ :debug_return_type ] || 'MetricTagConfigurationResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ] new_options = opts . merge ( :operation => :update_tag_configuration , :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: MetricsAPI#update_tag_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Update a tag configuration
Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
of a count, rate, or gauge metric.
Update a tag configuration Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations of a count rate or gauge metric .
# verify the required parameter 'metric_name' is set # verify the required parameter 'body' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
MetricTagConfigurationResponse data, response status code and response headers
MetricTagConfigurationResponse data response status code and response headers
Array<(MetricTagConfigurationResponse, Integer, Hash)>
metric_name
The name of the metric.
The name of the metric .
body
<not_specific>
opts
the optional parameters
the optional parameters
<not_specific>
None