Skip to content

Commit 00ec53c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix documentation rendering of bulk tag delete (#1478)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent d0dc370 commit 00ec53c

File tree

5 files changed

+88
-34
lines changed

5 files changed

+88
-34
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.4",
7-
"regenerated": "2023-05-25 19:52:06.501650",
8-
"spec_repo_commit": "e4c04414"
7+
"regenerated": "2023-05-26 16:53:07.986428",
8+
"spec_repo_commit": "fa84acd1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-25 19:52:06.521319",
13-
"spec_repo_commit": "e4c04414"
12+
"regenerated": "2023-05-26 16:53:07.998601",
13+
"spec_repo_commit": "fa84acd1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18752,7 +18752,7 @@ paths:
1875218752
schema:
1875318753
$ref: '#/components/schemas/APIErrorResponse'
1875418754
description: Too Many Requests
18755-
summary: Configure tags for multiple metrics
18755+
summary: Delete tags for multiple metrics
1875618756
tags:
1875718757
- Metrics
1875818758
x-codegen-request-body-name: body
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
Delete tags for multiple metrics returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.metrics_api import MetricsApi
7+
from datadog_api_client.v2.model.metric_bulk_configure_tags_type import MetricBulkConfigureTagsType
8+
from datadog_api_client.v2.model.metric_bulk_tag_config_delete import MetricBulkTagConfigDelete
9+
from datadog_api_client.v2.model.metric_bulk_tag_config_delete_attributes import MetricBulkTagConfigDeleteAttributes
10+
from datadog_api_client.v2.model.metric_bulk_tag_config_delete_request import MetricBulkTagConfigDeleteRequest
11+
12+
body = MetricBulkTagConfigDeleteRequest(
13+
data=MetricBulkTagConfigDelete(
14+
attributes=MetricBulkTagConfigDeleteAttributes(
15+
emails=[
16+
17+
18+
],
19+
),
20+
id="kafka.lag",
21+
type=MetricBulkConfigureTagsType.BULK_MANAGE_TAGS,
22+
),
23+
)
24+
25+
configuration = Configuration()
26+
with ApiClient(configuration) as api_client:
27+
api_instance = MetricsApi(api_client)
28+
response = api_instance.delete_bulk_tags_metrics_configuration(body=body)
29+
30+
print(response)

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def delete_bulk_tags_metrics_configuration(
514514
self,
515515
body: MetricBulkTagConfigDeleteRequest,
516516
) -> MetricBulkTagConfigResponse:
517-
"""Configure tags for multiple metrics.
517+
"""Delete tags for multiple metrics.
518518
519519
Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics.
520520
Metrics are selected by passing a metric name prefix.

tests/v2/features/metrics.feature

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Metrics
1313
Given a valid "apiKeyAuth" key in the system
1414
And an instance of "Metrics" API
1515

16-
@skip-typescript @team:DataDog/points-aggregation
16+
@skip-typescript @team:DataDog/metrics-experience
1717
Scenario: Configure tags for multiple metrics returns "Accepted" response
1818
Given a valid "appKeyAuth" key in the system
1919
And there is a valid "user" in the system
@@ -22,23 +22,23 @@ Feature: Metrics
2222
When the request is sent
2323
Then the response status is 202 Accepted
2424

25-
@generated @skip @team:DataDog/points-aggregation
25+
@generated @skip @team:DataDog/metrics-experience
2626
Scenario: Configure tags for multiple metrics returns "Bad Request" response
2727
Given a valid "appKeyAuth" key in the system
2828
And new "CreateBulkTagsMetricsConfiguration" request
2929
And body with value {"data": {"attributes": {"emails": ["[email protected]", "[email protected]"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
3030
When the request is sent
3131
Then the response status is 400 Bad Request
3232

33-
@generated @skip @team:DataDog/points-aggregation
33+
@generated @skip @team:DataDog/metrics-experience
3434
Scenario: Configure tags for multiple metrics returns "Not Found" response
3535
Given a valid "appKeyAuth" key in the system
3636
And new "CreateBulkTagsMetricsConfiguration" request
3737
And body with value {"data": {"attributes": {"emails": ["[email protected]", "[email protected]"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
3838
When the request is sent
3939
Then the response status is 404 Not Found
4040

41-
@generated @skip @team:DataDog/points-aggregation
41+
@generated @skip @team:DataDog/metrics-experience
4242
Scenario: Create a tag configuration returns "Bad Request" response
4343
Given a valid "appKeyAuth" key in the system
4444
And new "CreateTagConfiguration" request
@@ -47,7 +47,7 @@ Feature: Metrics
4747
When the request is sent
4848
Then the response status is 400 Bad Request
4949

50-
@generated @skip @team:DataDog/points-aggregation
50+
@generated @skip @team:DataDog/metrics-experience
5151
Scenario: Create a tag configuration returns "Conflict" response
5252
Given a valid "appKeyAuth" key in the system
5353
And new "CreateTagConfiguration" request
@@ -56,7 +56,7 @@ Feature: Metrics
5656
When the request is sent
5757
Then the response status is 409 Conflict
5858

59-
@replay-only @skip-validation @team:DataDog/points-aggregation
59+
@replay-only @skip-validation @team:DataDog/metrics-experience
6060
Scenario: Create a tag configuration returns "Created" response
6161
Given a valid "appKeyAuth" key in the system
6262
And new "CreateTagConfiguration" request
@@ -66,7 +66,7 @@ Feature: Metrics
6666
When the request is sent
6767
Then the response status is 201 Created
6868

69-
@replay-only @skip-validation @team:DataDog/points-aggregation
69+
@replay-only @skip-validation @team:DataDog/metrics-experience
7070
Scenario: Delete a tag configuration returns "No Content" response
7171
Given there is a valid "metric" in the system
7272
And there is a valid "metric_tag_configuration" in the system
@@ -76,30 +76,54 @@ Feature: Metrics
7676
When the request is sent
7777
Then the response status is 204 No Content
7878

79-
@generated @skip @team:DataDog/points-aggregation
79+
@generated @skip @team:DataDog/metrics-experience
8080
Scenario: Delete a tag configuration returns "Not found" response
8181
Given a valid "appKeyAuth" key in the system
8282
And new "DeleteTagConfiguration" request
8383
And request contains "metric_name" parameter from "REPLACE.ME"
8484
When the request is sent
8585
Then the response status is 404 Not found
8686

87-
@generated @skip @team:DataDog/points-aggregation
87+
@generated @skip @team:DataDog/metrics-experience
88+
Scenario: Delete tags for multiple metrics returns "Accepted" response
89+
Given a valid "appKeyAuth" key in the system
90+
And new "DeleteBulkTagsMetricsConfiguration" request
91+
And body with value {"data": {"attributes": {"emails": ["[email protected]", "[email protected]"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
92+
When the request is sent
93+
Then the response status is 202 Accepted
94+
95+
@generated @skip @team:DataDog/metrics-experience
96+
Scenario: Delete tags for multiple metrics returns "Bad Request" response
97+
Given a valid "appKeyAuth" key in the system
98+
And new "DeleteBulkTagsMetricsConfiguration" request
99+
And body with value {"data": {"attributes": {"emails": ["[email protected]", "[email protected]"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
100+
When the request is sent
101+
Then the response status is 400 Bad Request
102+
103+
@generated @skip @team:DataDog/metrics-experience
104+
Scenario: Delete tags for multiple metrics returns "Not Found" response
105+
Given a valid "appKeyAuth" key in the system
106+
And new "DeleteBulkTagsMetricsConfiguration" request
107+
And body with value {"data": {"attributes": {"emails": ["[email protected]", "[email protected]"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
108+
When the request is sent
109+
Then the response status is 404 Not Found
110+
111+
@generated @skip @team:DataDog/metrics-experience
88112
Scenario: Get a list of metrics returns "Bad Request" response
89113
Given a valid "appKeyAuth" key in the system
90114
And new "ListTagConfigurations" request
91115
When the request is sent
92116
Then the response status is 400 Bad Request
93117

94-
@skip @team:DataDog/points-aggregation
118+
@skip @team:DataDog/metrics-experience
95119
Scenario: Get a list of metrics returns "Success" response
96120
Given a valid "appKeyAuth" key in the system
97121
And there is a valid "metric_tag_configuration" in the system
98122
And new "ListTagConfigurations" request
99123
When the request is sent
100124
Then the response status is 200 Success
101125

102-
@team:DataDog/points-aggregation
126+
@team:DataDog/metrics-experience
103127
Scenario: Get a list of metrics with a tag filter returns "Success" response
104128
Given a valid "appKeyAuth" key in the system
105129
And new "ListTagConfigurations" request
@@ -108,7 +132,7 @@ Feature: Metrics
108132
Then the response status is 200 Success
109133
And the response "data" has length 0
110134

111-
@team:DataDog/points-aggregation
135+
@team:DataDog/metrics-experience
112136
Scenario: Get a list of metrics with configured filter returns "Success" response
113137
Given a valid "appKeyAuth" key in the system
114138
And new "ListTagConfigurations" request
@@ -117,23 +141,23 @@ Feature: Metrics
117141
Then the response status is 200 Success
118142
And the response "data[0].type" is equal to "manage_tags"
119143

120-
@generated @skip @team:DataDog/points-aggregation
144+
@generated @skip @team:DataDog/metrics-experience
121145
Scenario: List active tags and aggregations returns "Bad Request" response
122146
Given a valid "appKeyAuth" key in the system
123147
And new "ListActiveMetricConfigurations" request
124148
And request contains "metric_name" parameter from "REPLACE.ME"
125149
When the request is sent
126150
Then the response status is 400 Bad Request
127151

128-
@generated @skip @team:DataDog/points-aggregation
152+
@generated @skip @team:DataDog/metrics-experience
129153
Scenario: List active tags and aggregations returns "Not Found" response
130154
Given a valid "appKeyAuth" key in the system
131155
And new "ListActiveMetricConfigurations" request
132156
And request contains "metric_name" parameter from "REPLACE.ME"
133157
When the request is sent
134158
Then the response status is 404 Not Found
135159

136-
@skip-validation @team:DataDog/points-aggregation
160+
@skip-validation @team:DataDog/metrics-experience
137161
Scenario: List active tags and aggregations returns "Success" response
138162
Given a valid "appKeyAuth" key in the system
139163
And there is a valid "metric" in the system
@@ -143,23 +167,23 @@ Feature: Metrics
143167
Then the response status is 200 Success
144168
And the response "data.type" is equal to "actively_queried_configurations"
145169

146-
@generated @skip @team:DataDog/points-aggregation
170+
@generated @skip @team:DataDog/metrics-experience
147171
Scenario: List distinct metric volumes by metric name returns "Bad Request" response
148172
Given a valid "appKeyAuth" key in the system
149173
And new "ListVolumesByMetricName" request
150174
And request contains "metric_name" parameter from "REPLACE.ME"
151175
When the request is sent
152176
Then the response status is 400 Bad Request
153177

154-
@generated @skip @team:DataDog/points-aggregation
178+
@generated @skip @team:DataDog/metrics-experience
155179
Scenario: List distinct metric volumes by metric name returns "Not Found" response
156180
Given a valid "appKeyAuth" key in the system
157181
And new "ListVolumesByMetricName" request
158182
And request contains "metric_name" parameter from "REPLACE.ME"
159183
When the request is sent
160184
Then the response status is 404 Not Found
161185

162-
@skip-validation @team:DataDog/points-aggregation
186+
@skip-validation @team:DataDog/metrics-experience
163187
Scenario: List distinct metric volumes by metric name returns "Success" response
164188
Given a valid "appKeyAuth" key in the system
165189
And there is a valid "metric" in the system
@@ -170,15 +194,15 @@ Feature: Metrics
170194
Then the response status is 200 Success
171195
And the response "data.type" is equal to "metric_volumes"
172196

173-
@generated @skip @team:DataDog/points-aggregation
197+
@generated @skip @team:DataDog/metrics-experience
174198
Scenario: List tag configuration by name returns "Not Found" response
175199
Given a valid "appKeyAuth" key in the system
176200
And new "ListTagConfigurationByName" request
177201
And request contains "metric_name" parameter from "REPLACE.ME"
178202
When the request is sent
179203
Then the response status is 404 Not Found
180204

181-
@replay-only @skip-validation @team:DataDog/points-aggregation
205+
@replay-only @skip-validation @team:DataDog/metrics-experience
182206
Scenario: List tag configuration by name returns "Success" response
183207
Given a valid "appKeyAuth" key in the system
184208
And there is a valid "metric" in the system
@@ -189,23 +213,23 @@ Feature: Metrics
189213
Then the response status is 200 Success
190214
And the response "data.id" has the same value as "metric_tag_configuration.data.id"
191215

192-
@generated @skip @team:DataDog/points-aggregation
216+
@generated @skip @team:DataDog/metrics-experience
193217
Scenario: List tags by metric name returns "Bad Request" response
194218
Given a valid "appKeyAuth" key in the system
195219
And new "ListTagsByMetricName" request
196220
And request contains "metric_name" parameter from "REPLACE.ME"
197221
When the request is sent
198222
Then the response status is 400 Bad Request
199223

200-
@generated @skip @team:DataDog/points-aggregation
224+
@generated @skip @team:DataDog/metrics-experience
201225
Scenario: List tags by metric name returns "Not Found" response
202226
Given a valid "appKeyAuth" key in the system
203227
And new "ListTagsByMetricName" request
204228
And request contains "metric_name" parameter from "REPLACE.ME"
205229
When the request is sent
206230
Then the response status is 404 Not Found
207231

208-
@replay-only @skip-validation @team:DataDog/points-aggregation
232+
@replay-only @skip-validation @team:DataDog/metrics-experience
209233
Scenario: List tags by metric name returns "Success" response
210234
Given a valid "appKeyAuth" key in the system
211235
And there is a valid "metric" in the system
@@ -309,15 +333,15 @@ Feature: Metrics
309333
When the request is sent
310334
Then the response status is 202 Payload accepted
311335

312-
@generated @skip @team:DataDog/points-aggregation
336+
@generated @skip @team:DataDog/metrics-experience
313337
Scenario: Tag Configuration Cardinality Estimator returns "API error response." response
314338
Given a valid "appKeyAuth" key in the system
315339
And new "EstimateMetricsOutputSeries" request
316340
And request contains "metric_name" parameter from "REPLACE.ME"
317341
When the request is sent
318342
Then the response status is 404 API error response.
319343

320-
@replay-only @team:DataDog/points-aggregation
344+
@replay-only @team:DataDog/metrics-experience
321345
Scenario: Tag Configuration Cardinality Estimator returns "Success" response
322346
Given new "EstimateMetricsOutputSeries" request
323347
And request contains "metric_name" parameter with value "system.cpu.idle"
@@ -346,7 +370,7 @@ Feature: Metrics
346370
And the response "data.type" is equal to "timeseries_response"
347371
And the response "data.attributes.series[0].unit[0].name" is equal to "percent"
348372

349-
@generated @skip @team:DataDog/points-aggregation
373+
@generated @skip @team:DataDog/metrics-experience
350374
Scenario: Update a tag configuration returns "Bad Request" response
351375
Given a valid "appKeyAuth" key in the system
352376
And new "UpdateTagConfiguration" request
@@ -355,7 +379,7 @@ Feature: Metrics
355379
When the request is sent
356380
Then the response status is 400 Bad Request
357381

358-
@replay-only @skip-validation @team:DataDog/points-aggregation
382+
@replay-only @skip-validation @team:DataDog/metrics-experience
359383
Scenario: Update a tag configuration returns "OK" response
360384
Given a valid "appKeyAuth" key in the system
361385
And there is a valid "metric" in the system
@@ -367,7 +391,7 @@ Feature: Metrics
367391
Then the response status is 200 OK
368392
And the response "data.attributes.tags[0]" is equal to "app"
369393

370-
@generated @skip @team:DataDog/points-aggregation
394+
@generated @skip @team:DataDog/metrics-experience
371395
Scenario: Update a tag configuration returns "Unprocessable Entity" response
372396
Given a valid "appKeyAuth" key in the system
373397
And new "UpdateTagConfiguration" request

0 commit comments

Comments
 (0)