Skip to content

Commit 7e95a5c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3506512 of spec repo
1 parent cc042b6 commit 7e95a5c

File tree

6 files changed

+280
-52
lines changed

6 files changed

+280
-52
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 108 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -54470,23 +54470,20 @@ paths:
5447054470
tags:
5447154471
- DORA Metrics
5447254472
x-codegen-request-body-name: body
54473-
/api/v2/dora/deployments:
54474-
post:
54475-
description: Use this API endpoint to get a list of deployment events.
54476-
operationId: ListDORADeployments
54477-
requestBody:
54478-
content:
54479-
application/json:
54480-
schema:
54481-
$ref: '#/components/schemas/DORAListDeploymentsRequest'
54473+
/api/v2/dora/deployment/{deployment_id}:
54474+
delete:
54475+
description: Use this API endpoint to delete a deployment event.
54476+
operationId: DeleteDORADeployment
54477+
parameters:
54478+
- description: The ID of the deployment event to delete.
54479+
in: path
54480+
name: deployment_id
5448254481
required: true
54482+
schema:
54483+
type: string
5448354484
responses:
54484-
'200':
54485-
content:
54486-
application/json:
54487-
schema:
54488-
$ref: '#/components/schemas/DORAListResponse'
54489-
description: OK
54485+
'202':
54486+
description: Accepted
5449054487
'400':
5449154488
content:
5449254489
application/json:
@@ -54499,16 +54496,14 @@ paths:
5449954496
$ref: '#/components/responses/TooManyRequestsResponse'
5450054497
security:
5450154498
- apiKeyAuth: []
54502-
appKeyAuth: []
54503-
summary: Get a list of deployment events
54499+
- appKeyAuth: []
54500+
summary: Delete a deployment event
5450454501
tags:
5450554502
- DORA Metrics
54506-
x-codegen-request-body-name: body
5450754503
x-permission:
5450854504
operator: OR
5450954505
permissions:
54510-
- dora_metrics_read
54511-
/api/v2/dora/deployments/{deployment_id}:
54506+
- dora_metrics_write
5451254507
get:
5451354508
description: Use this API endpoint to get a deployment event.
5451454509
operationId: GetDORADeployment
@@ -54547,6 +54542,44 @@ paths:
5454754542
operator: OR
5454854543
permissions:
5454954544
- dora_metrics_read
54545+
/api/v2/dora/deployments:
54546+
post:
54547+
description: Use this API endpoint to get a list of deployment events.
54548+
operationId: ListDORADeployments
54549+
requestBody:
54550+
content:
54551+
application/json:
54552+
schema:
54553+
$ref: '#/components/schemas/DORAListDeploymentsRequest'
54554+
required: true
54555+
responses:
54556+
'200':
54557+
content:
54558+
application/json:
54559+
schema:
54560+
$ref: '#/components/schemas/DORAListResponse'
54561+
description: OK
54562+
'400':
54563+
content:
54564+
application/json:
54565+
schema:
54566+
$ref: '#/components/schemas/JSONAPIErrorResponse'
54567+
description: Bad Request
54568+
'403':
54569+
$ref: '#/components/responses/NotAuthorizedResponse'
54570+
'429':
54571+
$ref: '#/components/responses/TooManyRequestsResponse'
54572+
security:
54573+
- apiKeyAuth: []
54574+
appKeyAuth: []
54575+
summary: Get a list of deployment events
54576+
tags:
54577+
- DORA Metrics
54578+
x-codegen-request-body-name: body
54579+
x-permission:
54580+
operator: OR
54581+
permissions:
54582+
- dora_metrics_read
5455054583
/api/v2/dora/failure:
5455154584
post:
5455254585
description: 'Use this API endpoint to provide failure data for DORA metrics.
@@ -54593,23 +54626,20 @@ paths:
5459354626
tags:
5459454627
- DORA Metrics
5459554628
x-codegen-request-body-name: body
54596-
/api/v2/dora/failures:
54597-
post:
54598-
description: Use this API endpoint to get a list of failure events.
54599-
operationId: ListDORAFailures
54600-
requestBody:
54601-
content:
54602-
application/json:
54603-
schema:
54604-
$ref: '#/components/schemas/DORAListFailuresRequest'
54629+
/api/v2/dora/failure/{failure_id}:
54630+
delete:
54631+
description: Use this API endpoint to delete a failure event.
54632+
operationId: DeleteDORAFailure
54633+
parameters:
54634+
- description: The ID of the failure event to delete.
54635+
in: path
54636+
name: failure_id
5460554637
required: true
54638+
schema:
54639+
type: string
5460654640
responses:
54607-
'200':
54608-
content:
54609-
application/json:
54610-
schema:
54611-
$ref: '#/components/schemas/DORAListResponse'
54612-
description: OK
54641+
'202':
54642+
description: Accepted
5461354643
'400':
5461454644
content:
5461554645
application/json:
@@ -54622,16 +54652,14 @@ paths:
5462254652
$ref: '#/components/responses/TooManyRequestsResponse'
5462354653
security:
5462454654
- apiKeyAuth: []
54625-
appKeyAuth: []
54626-
summary: Get a list of failure events
54655+
- appKeyAuth: []
54656+
summary: Delete a failure event
5462754657
tags:
5462854658
- DORA Metrics
54629-
x-codegen-request-body-name: body
5463054659
x-permission:
5463154660
operator: OR
5463254661
permissions:
54633-
- dora_metrics_read
54634-
/api/v2/dora/failures/{failure_id}:
54662+
- dora_metrics_write
5463554663
get:
5463654664
description: Use this API endpoint to get a failure event.
5463754665
operationId: GetDORAFailure
@@ -54670,6 +54698,44 @@ paths:
5467054698
operator: OR
5467154699
permissions:
5467254700
- dora_metrics_read
54701+
/api/v2/dora/failures:
54702+
post:
54703+
description: Use this API endpoint to get a list of failure events.
54704+
operationId: ListDORAFailures
54705+
requestBody:
54706+
content:
54707+
application/json:
54708+
schema:
54709+
$ref: '#/components/schemas/DORAListFailuresRequest'
54710+
required: true
54711+
responses:
54712+
'200':
54713+
content:
54714+
application/json:
54715+
schema:
54716+
$ref: '#/components/schemas/DORAListResponse'
54717+
description: OK
54718+
'400':
54719+
content:
54720+
application/json:
54721+
schema:
54722+
$ref: '#/components/schemas/JSONAPIErrorResponse'
54723+
description: Bad Request
54724+
'403':
54725+
$ref: '#/components/responses/NotAuthorizedResponse'
54726+
'429':
54727+
$ref: '#/components/responses/TooManyRequestsResponse'
54728+
security:
54729+
- apiKeyAuth: []
54730+
appKeyAuth: []
54731+
summary: Get a list of failure events
54732+
tags:
54733+
- DORA Metrics
54734+
x-codegen-request-body-name: body
54735+
x-permission:
54736+
operator: OR
54737+
permissions:
54738+
- dora_metrics_read
5467354739
/api/v2/dora/incident:
5467454740
post:
5467554741
deprecated: true
@@ -72976,8 +73042,8 @@ tags:
7297673042
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for
7297773043
more information.
7297873044
name: Containers
72979-
- description: 'Search or send events for DORA Metrics to measure and improve your
72980-
software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
73045+
- description: 'Search, send, or delete events for DORA Metrics to measure and improve
73046+
your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/)
7298173047
for more information.
7298273048

7298373049

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete a deployment event returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = DORAMetricsApi(api_client)
11+
api_instance.delete_dora_deployment(
12+
deployment_id="NO_VALUE",
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete a failure event returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = DORAMetricsApi(api_client)
11+
api_instance.delete_dora_failure(
12+
failure_id="NO_VALUE",
13+
)

src/datadog_api_client/v2/api/dora_metrics_api.py

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
from datadog_api_client.configuration import Configuration
1111
from datadog_api_client.v2.model.dora_deployment_response import DORADeploymentResponse
1212
from datadog_api_client.v2.model.dora_deployment_request import DORADeploymentRequest
13+
from datadog_api_client.v2.model.dora_fetch_response import DORAFetchResponse
1314
from datadog_api_client.v2.model.dora_list_response import DORAListResponse
1415
from datadog_api_client.v2.model.dora_list_deployments_request import DORAListDeploymentsRequest
15-
from datadog_api_client.v2.model.dora_fetch_response import DORAFetchResponse
1616
from datadog_api_client.v2.model.dora_failure_response import DORAFailureResponse
1717
from datadog_api_client.v2.model.dora_failure_request import DORAFailureRequest
1818
from datadog_api_client.v2.model.dora_list_failures_request import DORAListFailuresRequest
1919

2020

2121
class DORAMetricsApi:
2222
"""
23-
Search or send events for DORA Metrics to measure and improve your software delivery performance. See the `DORA Metrics page <https://docs.datadoghq.com/dora_metrics/>`_ for more information.
23+
Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the `DORA Metrics page <https://docs.datadoghq.com/dora_metrics/>`_ for more information.
2424
2525
**Note** : DORA Metrics are not available in the US1-FED site.
2626
"""
@@ -90,11 +90,57 @@ def __init__(self, api_client=None):
9090
api_client=api_client,
9191
)
9292

93+
self._delete_dora_deployment_endpoint = _Endpoint(
94+
settings={
95+
"response_type": None,
96+
"auth": ["apiKeyAuth", "appKeyAuth"],
97+
"endpoint_path": "/api/v2/dora/deployment/{deployment_id}",
98+
"operation_id": "delete_dora_deployment",
99+
"http_method": "DELETE",
100+
"version": "v2",
101+
},
102+
params_map={
103+
"deployment_id": {
104+
"required": True,
105+
"openapi_types": (str,),
106+
"attribute": "deployment_id",
107+
"location": "path",
108+
},
109+
},
110+
headers_map={
111+
"accept": ["*/*"],
112+
},
113+
api_client=api_client,
114+
)
115+
116+
self._delete_dora_failure_endpoint = _Endpoint(
117+
settings={
118+
"response_type": None,
119+
"auth": ["apiKeyAuth", "appKeyAuth"],
120+
"endpoint_path": "/api/v2/dora/failure/{failure_id}",
121+
"operation_id": "delete_dora_failure",
122+
"http_method": "DELETE",
123+
"version": "v2",
124+
},
125+
params_map={
126+
"failure_id": {
127+
"required": True,
128+
"openapi_types": (str,),
129+
"attribute": "failure_id",
130+
"location": "path",
131+
},
132+
},
133+
headers_map={
134+
"accept": ["*/*"],
135+
},
136+
api_client=api_client,
137+
)
138+
93139
self._get_dora_deployment_endpoint = _Endpoint(
94140
settings={
95141
"response_type": (DORAFetchResponse,),
96142
"auth": ["apiKeyAuth", "appKeyAuth"],
97-
"endpoint_path": "/api/v2/dora/deployments/{deployment_id}",
143+
"endpoint_path": "/api/v2/dora/deployment/{deployment_id}",
98144
"operation_id": "get_dora_deployment",
99145
"http_method": "GET",
100146
"version": "v2",
@@ -117,7 +163,7 @@ def __init__(self, api_client=None):
117163
settings={
118164
"response_type": (DORAFetchResponse,),
119165
"auth": ["apiKeyAuth", "appKeyAuth"],
120-
"endpoint_path": "/api/v2/dora/failures/{failure_id}",
166+
"endpoint_path": "/api/v2/dora/failure/{failure_id}",
121167
"operation_id": "get_dora_failure",
122168
"http_method": "GET",
123169
"version": "v2",
@@ -243,6 +289,40 @@ def create_dora_incident(
243289
warnings.warn("create_dora_incident is deprecated", DeprecationWarning, stacklevel=2)
244290
return self._create_dora_incident_endpoint.call_with_http_info(**kwargs)
245291

292+
def delete_dora_deployment(
293+
self,
294+
deployment_id: str,
295+
) -> None:
296+
"""Delete a deployment event.
297+
298+
Use this API endpoint to delete a deployment event.
299+
300+
:param deployment_id: The ID of the deployment event to delete.
301+
:type deployment_id: str
302+
:rtype: None
303+
"""
304+
kwargs: Dict[str, Any] = {}
305+
kwargs["deployment_id"] = deployment_id
306+
307+
return self._delete_dora_deployment_endpoint.call_with_http_info(**kwargs)
308+
309+
def delete_dora_failure(
310+
self,
311+
failure_id: str,
312+
) -> None:
313+
"""Delete a failure event.
314+
315+
Use this API endpoint to delete a failure event.
316+
317+
:param failure_id: The ID of the failure event to delete.
318+
:type failure_id: str
319+
:rtype: None
320+
"""
321+
kwargs: Dict[str, Any] = {}
322+
kwargs["failure_id"] = failure_id
323+
324+
return self._delete_dora_failure_endpoint.call_with_http_info(**kwargs)
325+
246326
def get_dora_deployment(
247327
self,
248328
deployment_id: str,

0 commit comments

Comments
 (0)