Skip to content

Commit 81fb6bb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add tag exclusion field to metrics configuration API (#1134)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b478095 commit 81fb6bb

File tree

7 files changed

+91
-8
lines changed

7 files changed

+91
-8
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-10-31 16:58:26.143114",
8-
"spec_repo_commit": "781a7cfb"
7+
"regenerated": "2023-11-02 14:42:13.569022",
8+
"spec_repo_commit": "97ff7561"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-31 16:58:26.164106",
13-
"spec_repo_commit": "781a7cfb"
12+
"regenerated": "2023-11-02 14:42:13.589318",
13+
"spec_repo_commit": "97ff7561"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9530,6 +9530,15 @@ components:
95309530
properties:
95319531
emails:
95329532
$ref: '#/components/schemas/MetricBulkTagConfigEmailList'
9533+
exclude_tags_mode:
9534+
description: 'When set to true, the configuration will exclude the configured
9535+
tags and include any other submitted tags.
9536+
9537+
When set to false, the configuration will include the configured tags
9538+
and exclude any other submitted tags.
9539+
9540+
Defaults to false.'
9541+
type: boolean
95339542
tags:
95349543
$ref: '#/components/schemas/MetricBulkTagConfigTagNameList'
95359544
type: object
@@ -9610,6 +9619,13 @@ components:
96109619
properties:
96119620
emails:
96129621
$ref: '#/components/schemas/MetricBulkTagConfigEmailList'
9622+
exclude_tags_mode:
9623+
description: 'When set to true, the configuration will exclude the configured
9624+
tags and include any other submitted tags.
9625+
9626+
When set to false, the configuration will include the configured tags
9627+
and exclude any other submitted tags.'
9628+
type: boolean
96139629
status:
96149630
description: The status of the request.
96159631
example: Accepted
@@ -10074,6 +10090,15 @@ components:
1007410090
example: '2020-03-25T09:48:37.463835Z'
1007510091
format: date-time
1007610092
type: string
10093+
exclude_tags_mode:
10094+
description: 'When set to true, the configuration will exclude the configured
10095+
tags and include any other submitted tags.
10096+
10097+
When set to false, the configuration will include the configured tags
10098+
and exclude any other submitted tags.
10099+
10100+
Defaults to false. Requires `tags` property.'
10101+
type: boolean
1007710102
include_percentiles:
1007810103
description: 'Toggle to include or exclude percentile aggregations for distribution
1007910104
metrics.
@@ -10104,6 +10129,15 @@ components:
1010410129
properties:
1010510130
aggregations:
1010610131
$ref: '#/components/schemas/MetricCustomAggregations'
10132+
exclude_tags_mode:
10133+
description: 'When set to true, the configuration will exclude the configured
10134+
tags and include any other submitted tags.
10135+
10136+
When set to false, the configuration will include the configured tags
10137+
and exclude any other submitted tags.
10138+
10139+
Defaults to false. Requires `tags` property.'
10140+
type: boolean
1010710141
include_percentiles:
1010810142
description: 'Toggle to include/exclude percentiles for a distribution metric.
1010910143

@@ -23621,7 +23655,11 @@ paths:
2362123655
If multiple calls include the same metric, the last configuration applied
2362223656
(not by submit order) is used, do not
2362323657

23624-
expect deterministic ordering of concurrent calls.
23658+
expect deterministic ordering of concurrent calls. The `exclude_tags_mode`
23659+
value will set all metrics that match the prefix to
23660+
23661+
the same exclusion state, metric tag configurations do not support mixed inclusion
23662+
and exclusion for tags on the same metric.
2362523663

2362623664
Can only be used with application keys of users with the `Manage Tags for
2362723665
Metrics` permission.'
@@ -24002,7 +24040,11 @@ paths:
2400224040
Optionally, include percentile aggregations on any distribution metric or
2400324041
configure custom aggregations
2400424042

24005-
on any count, rate, or gauge metric.
24043+
on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true
24044+
the behavior is changed
24045+
24046+
from an allow-list to a deny-list, and tags in the defined list will not be
24047+
queryable.
2400624048

2400724049
Can only be used with application keys of users with the `Manage Tags for
2400824050
Metrics` permission.'

packages/datadog-api-client-v2/apis/MetricsApi.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,8 @@ export class MetricsApi {
17891789
* Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations.
17901790
* Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app.
17911791
* If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not
1792-
* expect deterministic ordering of concurrent calls.
1792+
* expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to
1793+
* the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric.
17931794
* Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
17941795
* @param param The request object
17951796
*/
@@ -1816,7 +1817,8 @@ export class MetricsApi {
18161817
/**
18171818
* Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric.
18181819
* Optionally, include percentile aggregations on any distribution metric or configure custom aggregations
1819-
* on any count, rate, or gauge metric.
1820+
* on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
1821+
* from an allow-list to a deny-list, and tags in the defined list will not be queryable.
18201822
* Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
18211823
* @param param The request object
18221824
*/

packages/datadog-api-client-v2/models/MetricBulkTagConfigCreateAttributes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ export class MetricBulkTagConfigCreateAttributes {
1414
* A list of account emails to notify when the configuration is applied.
1515
*/
1616
"emails"?: Array<string>;
17+
/**
18+
* When set to true, the configuration will exclude the configured tags and include any other submitted tags.
19+
* When set to false, the configuration will include the configured tags and exclude any other submitted tags.
20+
* Defaults to false.
21+
*/
22+
"excludeTagsMode"?: boolean;
1723
/**
1824
* A list of tag names to apply to the configuration.
1925
*/
@@ -33,6 +39,10 @@ export class MetricBulkTagConfigCreateAttributes {
3339
type: "Array<string>",
3440
format: "email",
3541
},
42+
excludeTagsMode: {
43+
baseName: "exclude_tags_mode",
44+
type: "boolean",
45+
},
3646
tags: {
3747
baseName: "tags",
3848
type: "Array<string>",

packages/datadog-api-client-v2/models/MetricBulkTagConfigStatusAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export class MetricBulkTagConfigStatusAttributes {
1414
* A list of account emails to notify when the configuration is applied.
1515
*/
1616
"emails"?: Array<string>;
17+
/**
18+
* When set to true, the configuration will exclude the configured tags and include any other submitted tags.
19+
* When set to false, the configuration will include the configured tags and exclude any other submitted tags.
20+
*/
21+
"excludeTagsMode"?: boolean;
1722
/**
1823
* The status of the request.
1924
*/
@@ -37,6 +42,10 @@ export class MetricBulkTagConfigStatusAttributes {
3742
type: "Array<string>",
3843
format: "email",
3944
},
45+
excludeTagsMode: {
46+
baseName: "exclude_tags_mode",
47+
type: "boolean",
48+
},
4049
status: {
4150
baseName: "status",
4251
type: "string",

packages/datadog-api-client-v2/models/MetricTagConfigurationAttributes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ export class MetricTagConfigurationAttributes {
3535
* Timestamp when the tag configuration was created.
3636
*/
3737
"createdAt"?: Date;
38+
/**
39+
* When set to true, the configuration will exclude the configured tags and include any other submitted tags.
40+
* When set to false, the configuration will include the configured tags and exclude any other submitted tags.
41+
* Defaults to false. Requires `tags` property.
42+
*/
43+
"excludeTagsMode"?: boolean;
3844
/**
3945
* Toggle to include or exclude percentile aggregations for distribution metrics.
4046
* Only present when the `metric_type` is `distribution`.
@@ -71,6 +77,10 @@ export class MetricTagConfigurationAttributes {
7177
type: "Date",
7278
format: "date-time",
7379
},
80+
excludeTagsMode: {
81+
baseName: "exclude_tags_mode",
82+
type: "boolean",
83+
},
7484
includePercentiles: {
7585
baseName: "include_percentiles",
7686
type: "boolean",

packages/datadog-api-client-v2/models/MetricTagConfigurationCreateAttributes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ export class MetricTagConfigurationCreateAttributes {
3131
* Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
3232
*/
3333
"aggregations"?: Array<MetricCustomAggregation>;
34+
/**
35+
* When set to true, the configuration will exclude the configured tags and include any other submitted tags.
36+
* When set to false, the configuration will include the configured tags and exclude any other submitted tags.
37+
* Defaults to false. Requires `tags` property.
38+
*/
39+
"excludeTagsMode"?: boolean;
3440
/**
3541
* Toggle to include/exclude percentiles for a distribution metric.
3642
* Defaults to false. Can only be applied to metrics that have a `metric_type` of `distribution`.
@@ -58,6 +64,10 @@ export class MetricTagConfigurationCreateAttributes {
5864
baseName: "aggregations",
5965
type: "Array<MetricCustomAggregation>",
6066
},
67+
excludeTagsMode: {
68+
baseName: "exclude_tags_mode",
69+
type: "boolean",
70+
},
6171
includePercentiles: {
6272
baseName: "include_percentiles",
6373
type: "boolean",

0 commit comments

Comments
 (0)