Skip to content

Commit 2ed6d0d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3584508 of spec repo
1 parent 93fae02 commit 2ed6d0d

File tree

7 files changed

+261
-4
lines changed

7 files changed

+261
-4
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56843,6 +56843,40 @@ paths:
5684356843
tags:
5684456844
- DORA Metrics
5684556845
x-codegen-request-body-name: body
56846+
/api/v2/dora/deployment/{deployment_id}:
56847+
delete:
56848+
description: Use this API endpoint to delete a deployment event.
56849+
operationId: DeleteDORADeployment
56850+
parameters:
56851+
- description: The ID of the deployment event to delete.
56852+
in: path
56853+
name: deployment_id
56854+
required: true
56855+
schema:
56856+
type: string
56857+
responses:
56858+
'202':
56859+
description: Accepted
56860+
'400':
56861+
content:
56862+
application/json:
56863+
schema:
56864+
$ref: '#/components/schemas/JSONAPIErrorResponse'
56865+
description: Bad Request
56866+
'403':
56867+
$ref: '#/components/responses/NotAuthorizedResponse'
56868+
'429':
56869+
$ref: '#/components/responses/TooManyRequestsResponse'
56870+
security:
56871+
- apiKeyAuth: []
56872+
- appKeyAuth: []
56873+
summary: Delete a deployment event
56874+
tags:
56875+
- DORA Metrics
56876+
x-permission:
56877+
operator: OR
56878+
permissions:
56879+
- dora_metrics_write
5684656880
/api/v2/dora/deployments:
5684756881
post:
5684856882
description: Use this API endpoint to get a list of deployment events.
@@ -56966,6 +57000,40 @@ paths:
5696657000
tags:
5696757001
- DORA Metrics
5696857002
x-codegen-request-body-name: body
57003+
/api/v2/dora/failure/{failure_id}:
57004+
delete:
57005+
description: Use this API endpoint to delete a failure event.
57006+
operationId: DeleteDORAFailure
57007+
parameters:
57008+
- description: The ID of the failure event to delete.
57009+
in: path
57010+
name: failure_id
57011+
required: true
57012+
schema:
57013+
type: string
57014+
responses:
57015+
'202':
57016+
description: Accepted
57017+
'400':
57018+
content:
57019+
application/json:
57020+
schema:
57021+
$ref: '#/components/schemas/JSONAPIErrorResponse'
57022+
description: Bad Request
57023+
'403':
57024+
$ref: '#/components/responses/NotAuthorizedResponse'
57025+
'429':
57026+
$ref: '#/components/responses/TooManyRequestsResponse'
57027+
security:
57028+
- apiKeyAuth: []
57029+
- appKeyAuth: []
57030+
summary: Delete a failure event
57031+
tags:
57032+
- DORA Metrics
57033+
x-permission:
57034+
operator: OR
57035+
permissions:
57036+
- dora_metrics_write
5696957037
/api/v2/dora/failures:
5697057038
post:
5697157039
description: Use this API endpoint to get a list of failure events.
@@ -75655,8 +75723,8 @@ tags:
7565575723
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for
7565675724
more information.
7565775725
name: Containers
75658-
- description: 'Search or send events for DORA Metrics to measure and improve your
75659-
software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
75726+
- description: 'Search, send, or delete events for DORA Metrics to measure and improve
75727+
your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
7566075728
for more information.
7566175729

7566275730

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("NO_VALUE")
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("NO_VALUE")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,9 @@
17451745
"v2.CreateDORADeployment" => {
17461746
"body" => "DORADeploymentRequest",
17471747
},
1748+
"v2.DeleteDORADeployment" => {
1749+
"deployment_id" => "String",
1750+
},
17481751
"v2.ListDORADeployments" => {
17491752
"body" => "DORAListDeploymentsRequest",
17501753
},
@@ -1754,6 +1757,9 @@
17541757
"v2.CreateDORAFailure" => {
17551758
"body" => "DORAFailureRequest",
17561759
},
1760+
"v2.DeleteDORAFailure" => {
1761+
"failure_id" => "String",
1762+
},
17571763
"v2.ListDORAFailures" => {
17581764
"body" => "DORAListFailuresRequest",
17591765
},

features/v2/dora_metrics.feature

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
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
4-
software delivery performance. See the [DORA Metrics
3+
Search, send, or delete events for DORA Metrics to measure and improve
4+
your 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.
77

88
Background:
99
Given a valid "apiKeyAuth" key in the system
1010
And an instance of "DORAMetrics" API
1111

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

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,12 @@
10641064
"type": "idempotent"
10651065
}
10661066
},
1067+
"DeleteDORADeployment": {
1068+
"tag": "DORA Metrics",
1069+
"undo": {
1070+
"type": "idempotent"
1071+
}
1072+
},
10671073
"ListDORADeployments": {
10681074
"tag": "DORA Metrics",
10691075
"undo": {
@@ -1082,6 +1088,12 @@
10821088
"type": "idempotent"
10831089
}
10841090
},
1091+
"DeleteDORAFailure": {
1092+
"tag": "DORA Metrics",
1093+
"undo": {
1094+
"type": "idempotent"
1095+
}
1096+
},
10851097
"ListDORAFailures": {
10861098
"tag": "DORA Metrics",
10871099
"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/deployment/{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/failure/{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)