Skip to content

Commit fc52e62

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update v2 metrics list endpoint filter by metric type to use metric type category (#2025)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 40077f2 commit fc52e62

File tree

9 files changed

+52
-13
lines changed

9 files changed

+52
-13
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-09-26 19:34:33.342614",
8-
"spec_repo_commit": "83debf9e"
7+
"regenerated": "2024-09-30 13:56:52.203086",
8+
"spec_repo_commit": "eb66b1cf"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-26 19:34:33.356783",
13-
"spec_repo_commit": "83debf9e"
12+
"regenerated": "2024-09-30 13:56:52.217359",
13+
"spec_repo_commit": "eb66b1cf"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13939,8 +13939,8 @@ components:
1393913939
- time: sum, space: sum
1394013940

1394113941

13942-
Can only be applied to metrics that have a `metric_type` of `count`, `rate`,
13943-
or `gauge`.'
13942+
Can only be applied to non_distribution metrics that have a `metric_type`
13943+
of `count`, `rate`, or `gauge`.'
1394413944
example:
1394513945
- space: sum
1394613946
time: sum
@@ -14548,6 +14548,17 @@ components:
1454814548
required:
1454914549
- data
1455014550
type: object
14551+
MetricTagConfigurationMetricTypeCategory:
14552+
default: distribution
14553+
description: The metric's type category.
14554+
enum:
14555+
- non_distribution
14556+
- distribution
14557+
example: distribution
14558+
type: string
14559+
x-enum-varnames:
14560+
- NON_DISTRIBUTION
14561+
- DISTRIBUTION
1455114562
MetricTagConfigurationMetricTypes:
1455214563
default: gauge
1455314564
description: The metric's type.
@@ -32405,7 +32416,7 @@ paths:
3240532416
name: filter[metric_type]
3240632417
required: false
3240732418
schema:
32408-
$ref: '#/components/schemas/MetricTagConfigurationMetricTypes'
32419+
$ref: '#/components/schemas/MetricTagConfigurationMetricTypeCategory'
3240932420
- description: 'Filter distributions with additional percentile
3241032421

3241132422
aggregations enabled or disabled.'

features/scenarios_model_mapping.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@
14891489
"v2.ListTagConfigurations" => {
14901490
"filter_configured" => "Boolean",
14911491
"filter_tags_configured" => "String",
1492-
"filter_metric_type" => "MetricTagConfigurationMetricTypes",
1492+
"filter_metric_type" => "MetricTagConfigurationMetricTypeCategory",
14931493
"filter_include_percentiles" => "Boolean",
14941494
"filter_queried" => "Boolean",
14951495
"filter_tags" => "String",

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,7 @@ def overrides
17671767
"v2.metric_tag_configuration_create_attributes" => "MetricTagConfigurationCreateAttributes",
17681768
"v2.metric_tag_configuration_create_data" => "MetricTagConfigurationCreateData",
17691769
"v2.metric_tag_configuration_create_request" => "MetricTagConfigurationCreateRequest",
1770+
"v2.metric_tag_configuration_metric_type_category" => "MetricTagConfigurationMetricTypeCategory",
17701771
"v2.metric_tag_configuration_metric_types" => "MetricTagConfigurationMetricTypes",
17711772
"v2.metric_tag_configuration_response" => "MetricTagConfigurationResponse",
17721773
"v2.metric_tag_configuration_type" => "MetricTagConfigurationType",

lib/datadog_api_client/v2/api/metrics_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def list_tag_configurations(opts = {})
607607
# @param opts [Hash] the optional parameters
608608
# @option opts [Boolean] :filter_configured Filter custom metrics that have configured tags.
609609
# @option opts [String] :filter_tags_configured Filter tag configurations by configured tags.
610-
# @option opts [MetricTagConfigurationMetricTypes] :filter_metric_type Filter metrics by metric type.
610+
# @option opts [MetricTagConfigurationMetricTypeCategory] :filter_metric_type Filter metrics by metric type.
611611
# @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
612612
# @option opts [Boolean] :filter_queried (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
613613
# @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter.
@@ -618,7 +618,7 @@ def list_tag_configurations_with_http_info(opts = {})
618618
if @api_client.config.debugging
619619
@api_client.config.logger.debug 'Calling API: MetricsAPI.list_tag_configurations ...'
620620
end
621-
allowable_values = ['gauge', 'count', 'rate', 'distribution']
621+
allowable_values = ['non_distribution', 'distribution']
622622
if @api_client.config.client_side_validation && opts[:'filter_metric_type'] && !allowable_values.include?(opts[:'filter_metric_type'])
623623
fail ArgumentError, "invalid value for \"filter_metric_type\", must be one of #{allowable_values}"
624624
end

lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MetricTagConfigurationAttributes
3636
# - time: sum, space: avg
3737
# - time: sum, space: sum
3838
#
39-
# Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
39+
# Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
4040
attr_accessor :aggregations
4141

4242
# Timestamp when the tag configuration was created.

lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MetricTagConfigurationCreateAttributes
3636
# - time: sum, space: avg
3737
# - time: sum, space: sum
3838
#
39-
# Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
39+
# Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
4040
attr_accessor :aggregations
4141

4242
# When set to true, the configuration will exclude the configured tags and include any other submitted tags.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The metric's type category.
21+
class MetricTagConfigurationMetricTypeCategory
22+
include BaseEnumModel
23+
24+
NON_DISTRIBUTION = "non_distribution".freeze
25+
DISTRIBUTION = "distribution".freeze
26+
end
27+
end

lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MetricTagConfigurationUpdateAttributes
3636
# - time: sum, space: avg
3737
# - time: sum, space: sum
3838
#
39-
# Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
39+
# Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
4040
attr_accessor :aggregations
4141

4242
# When set to true, the configuration will exclude the configured tags and include any other submitted tags.

0 commit comments

Comments
 (0)