Skip to content

Commit 3dee16a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3f0422a of spec repo
1 parent 7f240cd commit 3dee16a

File tree

7 files changed

+255
-3
lines changed

7 files changed

+255
-3
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52524,6 +52524,39 @@ paths:
5252452524
permissions:
5252552525
- dora_metrics_read
5252652526
/api/v2/dora/deployments/{deployment_id}:
52527+
delete:
52528+
description: Use this API endpoint to delete a deployment event.
52529+
operationId: DeleteDORADeployment
52530+
parameters:
52531+
- description: The ID of the deployment event to delete.
52532+
in: path
52533+
name: deployment_id
52534+
required: true
52535+
schema:
52536+
type: string
52537+
responses:
52538+
'202':
52539+
description: Accepted
52540+
'400':
52541+
content:
52542+
application/json:
52543+
schema:
52544+
$ref: '#/components/schemas/JSONAPIErrorResponse'
52545+
description: Bad Request
52546+
'403':
52547+
$ref: '#/components/responses/NotAuthorizedResponse'
52548+
'429':
52549+
$ref: '#/components/responses/TooManyRequestsResponse'
52550+
security:
52551+
- apiKeyAuth: []
52552+
- appKeyAuth: []
52553+
summary: Delete a deployment event
52554+
tags:
52555+
- DORA Metrics
52556+
x-permission:
52557+
operator: OR
52558+
permissions:
52559+
- dora_metrics_write
5252752560
get:
5252852561
description: Use this API endpoint to get a deployment event.
5252952562
operationId: GetDORADeployment
@@ -52647,6 +52680,39 @@ paths:
5264752680
permissions:
5264852681
- dora_metrics_read
5264952682
/api/v2/dora/failures/{failure_id}:
52683+
delete:
52684+
description: Use this API endpoint to delete a failure event.
52685+
operationId: DeleteDORAFailure
52686+
parameters:
52687+
- description: The ID of the failure event to delete.
52688+
in: path
52689+
name: failure_id
52690+
required: true
52691+
schema:
52692+
type: string
52693+
responses:
52694+
'202':
52695+
description: Accepted
52696+
'400':
52697+
content:
52698+
application/json:
52699+
schema:
52700+
$ref: '#/components/schemas/JSONAPIErrorResponse'
52701+
description: Bad Request
52702+
'403':
52703+
$ref: '#/components/responses/NotAuthorizedResponse'
52704+
'429':
52705+
$ref: '#/components/responses/TooManyRequestsResponse'
52706+
security:
52707+
- apiKeyAuth: []
52708+
- appKeyAuth: []
52709+
summary: Delete a failure event
52710+
tags:
52711+
- DORA Metrics
52712+
x-permission:
52713+
operator: OR
52714+
permissions:
52715+
- dora_metrics_write
5265052716
get:
5265152717
description: Use this API endpoint to get a failure event.
5265252718
operationId: GetDORAFailure
@@ -70392,8 +70458,8 @@ tags:
7039270458
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for
7039370459
more information.
7039470460
name: Containers
70395-
- description: 'Search or send events for DORA Metrics to measure and improve your
70396-
software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
70461+
- description: 'Search, send or delete events for DORA Metrics to measure and improve
70462+
your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
7039770463
for more information.
7039870464

7039970465

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a deployment event returns "Accepted" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5+
p api_instance.delete_dora_deployment("deployment_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a failure event returns "Accepted" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5+
p api_instance.delete_dora_failure("failure_id")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,9 @@
16711671
"v2.ListDORADeployments" => {
16721672
"body" => "DORAListDeploymentsRequest",
16731673
},
1674+
"v2.DeleteDORADeployment" => {
1675+
"deployment_id" => "String",
1676+
},
16741677
"v2.GetDORADeployment" => {
16751678
"deployment_id" => "String",
16761679
},
@@ -1680,6 +1683,9 @@
16801683
"v2.ListDORAFailures" => {
16811684
"body" => "DORAListFailuresRequest",
16821685
},
1686+
"v2.DeleteDORAFailure" => {
1687+
"failure_id" => "String",
1688+
},
16831689
"v2.GetDORAFailure" => {
16841690
"failure_id" => "String",
16851691
},

features/v2/dora_metrics.feature

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@endpoint(dora-metrics) @endpoint(dora-metrics-v2)
22
Feature: DORA Metrics
3-
Search or send events for DORA Metrics to measure and improve your
3+
Search, send or delete events for DORA Metrics to measure and improve your
44
software delivery performance. See the [DORA Metrics
55
page](https://docs.datadoghq.com/dora_metrics/) for more information.
66
**Note**: DORA Metrics are not available in the US1-FED site.
@@ -9,6 +9,34 @@ Feature: DORA Metrics
99
Given a valid "apiKeyAuth" key in the system
1010
And an instance of "DORAMetrics" API
1111

12+
@generated @skip @team:DataDog/ci-app-backend
13+
Scenario: Delete a deployment event returns "Accepted" response
14+
Given new "DeleteDORADeployment" request
15+
And request contains "deployment_id" parameter from "REPLACE.ME"
16+
When the request is sent
17+
Then the response status is 202 Accepted
18+
19+
@generated @skip @team:DataDog/ci-app-backend
20+
Scenario: Delete a deployment event returns "Bad Request" response
21+
Given new "DeleteDORADeployment" request
22+
And request contains "deployment_id" parameter from "REPLACE.ME"
23+
When the request is sent
24+
Then the response status is 400 Bad Request
25+
26+
@generated @skip @team:DataDog/ci-app-backend
27+
Scenario: Delete a failure event returns "Accepted" response
28+
Given new "DeleteDORAFailure" request
29+
And request contains "failure_id" parameter from "REPLACE.ME"
30+
When the request is sent
31+
Then the response status is 202 Accepted
32+
33+
@generated @skip @team:DataDog/ci-app-backend
34+
Scenario: Delete a failure event returns "Bad Request" response
35+
Given new "DeleteDORAFailure" request
36+
And request contains "failure_id" parameter from "REPLACE.ME"
37+
When the request is sent
38+
Then the response status is 400 Bad Request
39+
1240
@generated @skip @team:DataDog/ci-app-backend
1341
Scenario: Get a deployment event returns "Bad Request" response
1442
Given new "GetDORADeployment" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,12 @@
955955
"type": "safe"
956956
}
957957
},
958+
"DeleteDORADeployment": {
959+
"tag": "DORA Metrics",
960+
"undo": {
961+
"type": "idempotent"
962+
}
963+
},
958964
"GetDORADeployment": {
959965
"tag": "DORA Metrics",
960966
"undo": {
@@ -973,6 +979,12 @@
973979
"type": "safe"
974980
}
975981
},
982+
"DeleteDORAFailure": {
983+
"tag": "DORA Metrics",
984+
"undo": {
985+
"type": "idempotent"
986+
}
987+
},
976988
"GetDORAFailure": {
977989
"tag": "DORA Metrics",
978990
"undo": {

lib/datadog_api_client/v2/api/dora_metrics_api.rb

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,136 @@ def create_dora_incident_with_http_info(body, opts = {})
242242
return data, status_code, headers
243243
end
244244

245+
# Delete a deployment event.
246+
#
247+
# @see #delete_dora_deployment_with_http_info
248+
def delete_dora_deployment(deployment_id, opts = {})
249+
delete_dora_deployment_with_http_info(deployment_id, opts)
250+
nil
251+
end
252+
253+
# Delete a deployment event.
254+
#
255+
# Use this API endpoint to delete a deployment event.
256+
#
257+
# @param deployment_id [String] The ID of the deployment event to delete.
258+
# @param opts [Hash] the optional parameters
259+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
260+
def delete_dora_deployment_with_http_info(deployment_id, opts = {})
261+
262+
if @api_client.config.debugging
263+
@api_client.config.logger.debug 'Calling API: DORAMetricsAPI.delete_dora_deployment ...'
264+
end
265+
# verify the required parameter 'deployment_id' is set
266+
if @api_client.config.client_side_validation && deployment_id.nil?
267+
fail ArgumentError, "Missing the required parameter 'deployment_id' when calling DORAMetricsAPI.delete_dora_deployment"
268+
end
269+
# resource path
270+
local_var_path = '/api/v2/dora/deployments/{deployment_id}'.sub('{deployment_id}', CGI.escape(deployment_id.to_s).gsub('%2F', '/'))
271+
272+
# query parameters
273+
query_params = opts[:query_params] || {}
274+
275+
# header parameters
276+
header_params = opts[:header_params] || {}
277+
# HTTP header 'Accept' (if needed)
278+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
279+
280+
# form parameters
281+
form_params = opts[:form_params] || {}
282+
283+
# http body (model)
284+
post_body = opts[:debug_body]
285+
286+
# return_type
287+
return_type = opts[:debug_return_type]
288+
289+
# auth_names
290+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
291+
292+
new_options = opts.merge(
293+
:operation => :delete_dora_deployment,
294+
:header_params => header_params,
295+
:query_params => query_params,
296+
:form_params => form_params,
297+
:body => post_body,
298+
:auth_names => auth_names,
299+
:return_type => return_type,
300+
:api_version => "V2"
301+
)
302+
303+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
304+
if @api_client.config.debugging
305+
@api_client.config.logger.debug "API called: DORAMetricsAPI#delete_dora_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306+
end
307+
return data, status_code, headers
308+
end
309+
310+
# Delete a failure event.
311+
#
312+
# @see #delete_dora_failure_with_http_info
313+
def delete_dora_failure(failure_id, opts = {})
314+
delete_dora_failure_with_http_info(failure_id, opts)
315+
nil
316+
end
317+
318+
# Delete a failure event.
319+
#
320+
# Use this API endpoint to delete a failure event.
321+
#
322+
# @param failure_id [String] The ID of the failure event to delete.
323+
# @param opts [Hash] the optional parameters
324+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
325+
def delete_dora_failure_with_http_info(failure_id, opts = {})
326+
327+
if @api_client.config.debugging
328+
@api_client.config.logger.debug 'Calling API: DORAMetricsAPI.delete_dora_failure ...'
329+
end
330+
# verify the required parameter 'failure_id' is set
331+
if @api_client.config.client_side_validation && failure_id.nil?
332+
fail ArgumentError, "Missing the required parameter 'failure_id' when calling DORAMetricsAPI.delete_dora_failure"
333+
end
334+
# resource path
335+
local_var_path = '/api/v2/dora/failures/{failure_id}'.sub('{failure_id}', CGI.escape(failure_id.to_s).gsub('%2F', '/'))
336+
337+
# query parameters
338+
query_params = opts[:query_params] || {}
339+
340+
# header parameters
341+
header_params = opts[:header_params] || {}
342+
# HTTP header 'Accept' (if needed)
343+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
344+
345+
# form parameters
346+
form_params = opts[:form_params] || {}
347+
348+
# http body (model)
349+
post_body = opts[:debug_body]
350+
351+
# return_type
352+
return_type = opts[:debug_return_type]
353+
354+
# auth_names
355+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
356+
357+
new_options = opts.merge(
358+
:operation => :delete_dora_failure,
359+
:header_params => header_params,
360+
:query_params => query_params,
361+
:form_params => form_params,
362+
:body => post_body,
363+
:auth_names => auth_names,
364+
:return_type => return_type,
365+
:api_version => "V2"
366+
)
367+
368+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
369+
if @api_client.config.debugging
370+
@api_client.config.logger.debug "API called: DORAMetricsAPI#delete_dora_failure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371+
end
372+
return data, status_code, headers
373+
end
374+
245375
# Get a deployment event.
246376
#
247377
# @see #get_dora_deployment_with_http_info

0 commit comments

Comments
 (0)