lib/datadog_api_client/v2/api/metrics_api.rb
# List tag configurations
# Returns all configured count/gauge/rate/distribution metric names
# (with additional filters if specified).
# @param opts [Hash] the optional parameters
# @option opts [Boolean] :filter_configured Filter metrics that have configured tags.
# @option opts [String] :filter_tags_configured Filter tag configurations by configured tags.
# @option opts [MetricTagConfigurationMetricTypes] :filter_metric_type Filter tag configurations by metric type.
# @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
# @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Cannot be combined with other filters.
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] query. Defaults value is 3600 (1 hour), maximum value is 172,800 (2 days).
# @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
List tag configurations
Returns all configured count/gauge/rate/distribution metric names
(with additional filters if specified).
List tag configurations Returns all configured count / gauge / rate / distribution metric names ( with additional filters if specified ) .
def list_tag_configurations_with_http_info(opts = {})
      if @api_client.config.unstable_operations.has_key?(:list_tag_configurations)
        unstable_enabled = @api_client.config.unstable_operations[:list_tag_configurations]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "list_tag_configurations")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_tag_configurations"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsAPI.list_tag_configurations ...'
      end
      allowable_values = ['gauge', 'count', 'rate', 'distribution']
      if @api_client.config.client_side_validation && opts[:'filter_metric_type'] && !allowable_values.include?(opts[:'filter_metric_type'])
        fail ArgumentError, "invalid value for \"filter_metric_type\", must be one of #{allowable_values}"
      end
      local_var_path = '/api/v2/metrics'
      query_params = opts[:query_params] || {}
      query_params[:'filter[configured]'] = opts[:'filter_configured'] if !opts[:'filter_configured'].nil?
      query_params[:'filter[tags_configured]'] = opts[:'filter_tags_configured'] if !opts[:'filter_tags_configured'].nil?
      query_params[:'filter[metric_type]'] = opts[:'filter_metric_type'] if !opts[:'filter_metric_type'].nil?
      query_params[:'filter[include_percentiles]'] = opts[:'filter_include_percentiles'] if !opts[:'filter_include_percentiles'].nil?
      query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
      query_params[:'window[seconds]'] = opts[:'window_seconds'] if !opts[:'window_seconds'].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] || 'MetricsAndMetricTagConfigurationsResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
      new_options = opts.merge(
        :operation => :list_tag_configurations,
        :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_configurations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_tag_configurations_with_http_info ( opts = { } ) if @api_client . config . unstable_operations . has_key? ( :list_tag_configurations ) unstable_enabled = @api_client . config . unstable_operations [ :list_tag_configurations ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "list_tag_configurations" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "list_tag_configurations" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MetricsAPI.list_tag_configurations ...' end allowable_values = [ 'gauge' , 'count' , 'rate' , 'distribution' ] if @api_client . config . client_side_validation && opts [ :' filter_metric_type ' ] && ! allowable_values . include? ( opts [ :' filter_metric_type ' ] ) fail ArgumentError , "invalid value for \"filter_metric_type\", must be one of #{allowable_values}" end local_var_path = '/api/v2/metrics' query_params = opts [ :query_params ] || { } query_params [ :' filter[configured] ' ] = opts [ :' filter_configured ' ] if ! opts [ :' filter_configured ' ] . nil? query_params [ :' filter[tags_configured] ' ] = opts [ :' filter_tags_configured ' ] if ! opts [ :' filter_tags_configured ' ] . nil? query_params [ :' filter[metric_type] ' ] = opts [ :' filter_metric_type ' ] if ! opts [ :' filter_metric_type ' ] . nil? query_params [ :' filter[include_percentiles] ' ] = opts [ :' filter_include_percentiles ' ] if ! opts [ :' filter_include_percentiles ' ] . nil? query_params [ :' filter[tags] ' ] = opts [ :' filter_tags ' ] if ! opts [ :' filter_tags ' ] . nil? query_params [ :' window[seconds] ' ] = opts [ :' window_seconds ' ] if ! opts [ :' window_seconds ' ] . 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 ] || 'MetricsAndMetricTagConfigurationsResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ] new_options = opts . merge ( :operation => :list_tag_configurations , :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_configurations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
List tag configurations
Returns all configured count/gauge/rate/distribution metric names
(with additional filters if specified).
List tag configurations Returns all configured count / gauge / rate / distribution metric names ( with additional filters if specified ) .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
MetricsAndMetricTagConfigurationsResponse data response status code and response headers
Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>
opts
:window_seconds The number of seconds of look back (from now) to apply to a filter[tag] query. Defaults value is 3600 (1 hour), maximum value is 172,800 (2 days).
: window_seconds The number of seconds of look back ( from now ) to apply to a filter [ tag ] query . Defaults value is 3600 ( 1 hour ) maximum value is 172 800 ( 2 days ) .