lib/datadog_api_client/v2/api/metrics_api.rb
# List tag configuration by name
# Returns the tag configuration for the given metric name.
# @param metric_name [String] The name of the metric.
# @param opts [Hash] the optional parameters
# @return [Array<(MetricTagConfigurationResponse, Integer, Hash)>] MetricTagConfigurationResponse data, response status code and response headers
List tag configuration by name
Returns the tag configuration for the given metric name.
List tag configuration by name Returns the tag configuration for the given metric name .
def list_tag_configuration_by_name_with_http_info(metric_name, opts = {})
      if @api_client.config.unstable_operations.has_key?(:list_tag_configuration_by_name)
        unstable_enabled = @api_client.config.unstable_operations[:list_tag_configuration_by_name]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "list_tag_configuration_by_name")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_tag_configuration_by_name"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsAPI.list_tag_configuration_by_name ...'
      end
      if @api_client.config.client_side_validation && metric_name.nil?
        fail ArgumentError, "Missing the required parameter 'metric_name' when calling MetricsAPI.list_tag_configuration_by_name"
      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'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'MetricTagConfigurationResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
      new_options = opts.merge(
        :operation => :list_tag_configuration_by_name,
        :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: MetricsAPI#list_tag_configuration_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_tag_configuration_by_name_with_http_info ( metric_name , opts = { } ) if @api_client . config . unstable_operations . has_key? ( :list_tag_configuration_by_name ) unstable_enabled = @api_client . config . unstable_operations [ :list_tag_configuration_by_name ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "list_tag_configuration_by_name" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "list_tag_configuration_by_name" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MetricsAPI.list_tag_configuration_by_name ...' end if @api_client . config . client_side_validation && metric_name . nil? fail ArgumentError , "Missing the required parameter 'metric_name' when calling MetricsAPI.list_tag_configuration_by_name" 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' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'MetricTagConfigurationResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ] new_options = opts . merge ( :operation => :list_tag_configuration_by_name , :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: MetricsAPI#list_tag_configuration_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
List tag configuration by name
Returns the tag configuration for the given metric name.
List tag configuration by name Returns the tag configuration for the given metric name .
# verify the required parameter 'metric_name' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # 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 .
opts
the optional parameters
the optional parameters