Skip to content

Commit 8d2db05

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adds exclude_tag_modes to PATCH metric tags (#1760)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 54657b5 commit 8d2db05

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
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": "2023-11-09 10:45:49.710867",
8-
"spec_repo_commit": "66a4cef6"
7+
"regenerated": "2023-11-09 22:07:32.827936",
8+
"spec_repo_commit": "893a406f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-09 10:45:49.725898",
13-
"spec_repo_commit": "66a4cef6"
12+
"regenerated": "2023-11-09 22:07:32.841869",
13+
"spec_repo_commit": "893a406f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10301,6 +10301,15 @@ components:
1030110301
properties:
1030210302
aggregations:
1030310303
$ref: '#/components/schemas/MetricCustomAggregations'
10304+
exclude_tags_mode:
10305+
description: 'When set to true, the configuration will exclude the configured
10306+
tags and include any other submitted tags.
10307+
10308+
When set to false, the configuration will include the configured tags
10309+
and exclude any other submitted tags.
10310+
10311+
Defaults to false. Requires `tags` property.'
10312+
type: boolean
1030410313
include_percentiles:
1030510314
description: 'Toggle to include/exclude percentiles for a distribution metric.
1030610315

@@ -24357,7 +24366,11 @@ paths:
2435724366
description: 'Update the tag configuration of a metric or percentile aggregations
2435824367
of a distribution metric or custom aggregations
2435924368

24360-
of a count, rate, or gauge metric.
24369+
of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true
24370+
the behavior is changed
24371+
24372+
from an allow-list to a deny-list, and tags in the defined list will not be
24373+
queryable.
2436124374

2436224375
Can only be used with application keys from users with the `Manage Tags for
2436324376
Metrics` permission.'

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ def update_tag_configuration(
790790
"""Update a tag configuration.
791791
792792
Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
793-
of a count, rate, or gauge metric.
793+
of a count, rate, or gauge metric. By setting ``exclude_tags_mode`` to true the behavior is changed
794+
from an allow-list to a deny-list, and tags in the defined list will not be queryable.
794795
Can only be used with application keys from users with the ``Manage Tags for Metrics`` permission.
795796
796797
:param metric_name: The name of the metric.

src/datadog_api_client/v2/model/metric_tag_configuration_update_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ def openapi_types(_):
2424

2525
return {
2626
"aggregations": (MetricCustomAggregations,),
27+
"exclude_tags_mode": (bool,),
2728
"include_percentiles": (bool,),
2829
"tags": ([str],),
2930
}
3031

3132
attribute_map = {
3233
"aggregations": "aggregations",
34+
"exclude_tags_mode": "exclude_tags_mode",
3335
"include_percentiles": "include_percentiles",
3436
"tags": "tags",
3537
}
3638

3739
def __init__(
3840
self_,
3941
aggregations: Union[MetricCustomAggregations, UnsetType] = unset,
42+
exclude_tags_mode: Union[bool, UnsetType] = unset,
4043
include_percentiles: Union[bool, UnsetType] = unset,
4144
tags: Union[List[str], UnsetType] = unset,
4245
**kwargs,
@@ -62,6 +65,11 @@ def __init__(
6265
Can only be applied to metrics that have a ``metric_type`` of ``count`` , ``rate`` , or ``gauge``.
6366
:type aggregations: MetricCustomAggregations, optional
6467
68+
:param exclude_tags_mode: When set to true, the configuration will exclude the configured tags and include any other submitted tags.
69+
When set to false, the configuration will include the configured tags and exclude any other submitted tags.
70+
Defaults to false. Requires ``tags`` property.
71+
:type exclude_tags_mode: bool, optional
72+
6573
:param include_percentiles: Toggle to include/exclude percentiles for a distribution metric.
6674
Defaults to false. Can only be applied to metrics that have a ``metric_type`` of ``distribution``.
6775
:type include_percentiles: bool, optional
@@ -71,6 +79,8 @@ def __init__(
7179
"""
7280
if aggregations is not unset:
7381
kwargs["aggregations"] = aggregations
82+
if exclude_tags_mode is not unset:
83+
kwargs["exclude_tags_mode"] = exclude_tags_mode
7484
if include_percentiles is not unset:
7585
kwargs["include_percentiles"] = include_percentiles
7686
if tags is not unset:

0 commit comments

Comments
 (0)