Class: DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes
- Defined in:
- lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb
Overview
Object containing the definition of a metric tag configuration to be created.
Instance Attribute Summary collapse
-
#aggregations ⇒ Object
A list of queryable aggregation combinations for a count, rate, or gauge metric.
-
#include_percentiles ⇒ Object
Toggle to include/exclude percentiles for a distribution metric.
-
#metric_type ⇒ Object
Returns the value of attribute metric_type.
-
#tags ⇒ Object
A list of tag keys that will be queryable for your metric.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MetricTagConfigurationCreateAttributes
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ MetricTagConfigurationCreateAttributes
Initializes the object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb', line 74 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'aggregations') if (value = attributes[:'aggregations']).is_a?(Array) self.aggregations = value end end if attributes.key?(:'include_percentiles') self.include_percentiles = attributes[:'include_percentiles'] else self.include_percentiles = false end if attributes.key?(:'metric_type') self.metric_type = attributes[:'metric_type'] else self.metric_type = 'gauge' end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end end end |
Instance Attribute Details
#aggregations ⇒ Object
A list of queryable aggregation combinations for a count, rate, or gauge metric. By default, count and rate metrics require the (time: sum, space: sum) aggregation and Gauge metrics require the (time: avg, space: avg) aggregation. Additional time & space combinations are also available: - time: avg, space: avg - time: avg, space: max - time: avg, space: min - time: avg, space: sum - time: count, space: sum - time: max, space: max - time: min, space: min - time: sum, space: avg - time: sum, space: sum Can only be applied to metrics that have a ‘metric_type` of `count`, `rate`, or `gauge`.
27 28 29 |
# File 'lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb', line 27 def aggregations @aggregations end |
#include_percentiles ⇒ Object
Toggle to include/exclude percentiles for a distribution metric. Defaults to false. Can only be applied to metrics that have a ‘metric_type` of `distribution`.
30 31 32 |
# File 'lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb', line 30 def include_percentiles @include_percentiles end |
#metric_type ⇒ Object
Returns the value of attribute metric_type.
32 33 34 |
# File 'lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb', line 32 def metric_type @metric_type end |
#tags ⇒ Object
A list of tag keys that will be queryable for your metric.
35 36 37 |
# File 'lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb', line 35 def end |