Skip to content

Commit f77bb48

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Deprecate Incident Services endpoints (#1904)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent d786bcf commit f77bb48

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
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": "2024-03-11 18:06:45.607287",
8-
"spec_repo_commit": "ac12ffe4"
7+
"regenerated": "2024-03-12 14:55:32.911544",
8+
"spec_repo_commit": "e9113926"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-03-11 18:06:45.623937",
13-
"spec_repo_commit": "ac12ffe4"
12+
"regenerated": "2024-03-12 14:55:32.926760",
13+
"spec_repo_commit": "e9113926"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32528,6 +32528,7 @@ paths:
3252832528
x-codegen-request-body-name: body
3252932529
/api/v2/services:
3253032530
get:
32531+
deprecated: true
3253132532
description: Get all incident services uploaded for the requesting user's organization.
3253232533
If the `include[users]` query parameter is provided, the included attribute
3253332534
will contain the users related to these incident services.
@@ -32562,10 +32563,9 @@ paths:
3256232563
summary: Get a list of all incident services
3256332564
tags:
3256432565
- Incident Services
32565-
x-unstable: '**Note**: This endpoint is in public beta.
32566-
32567-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
32566+
x-unstable: '**Note**: This endpoint is deprecated.'
3256832567
post:
32568+
deprecated: true
3256932569
description: Creates a new incident service.
3257032570
operationId: CreateIncidentService
3257132571
requestBody:
@@ -32601,9 +32601,7 @@ paths:
3260132601
tags:
3260232602
- Incident Services
3260332603
x-codegen-request-body-name: body
32604-
x-unstable: '**Note**: This endpoint is in public beta.
32605-
32606-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
32604+
x-unstable: '**Note**: This endpoint is deprecated.'
3260732605
/api/v2/services/definitions:
3260832606
get:
3260932607
description: Get a list of all service definitions from the Datadog Service
@@ -32728,6 +32726,7 @@ paths:
3272832726
- Service Definition
3272932727
/api/v2/services/{service_id}:
3273032728
delete:
32729+
deprecated: true
3273132730
description: Deletes an existing incident service.
3273232731
operationId: DeleteIncidentService
3273332732
parameters:
@@ -32753,10 +32752,9 @@ paths:
3275332752
summary: Delete an existing incident service
3275432753
tags:
3275532754
- Incident Services
32756-
x-unstable: '**Note**: This endpoint is in public beta.
32757-
32758-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
32755+
x-unstable: '**Note**: This endpoint is deprecated.'
3275932756
get:
32757+
deprecated: true
3276032758
description: 'Get details of an incident service. If the `include[users]` query
3276132759
parameter is provided,
3276232760

@@ -32790,10 +32788,9 @@ paths:
3279032788
summary: Get details of an incident service
3279132789
tags:
3279232790
- Incident Services
32793-
x-unstable: '**Note**: This endpoint is in public beta.
32794-
32795-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
32791+
x-unstable: '**Note**: This endpoint is deprecated.'
3279632792
patch:
32793+
deprecated: true
3279732794
description: Updates an existing incident service. Only provide the attributes
3279832795
which should be updated as this request is a partial update.
3279932796
operationId: UpdateIncidentService
@@ -32832,9 +32829,7 @@ paths:
3283232829
tags:
3283332830
- Incident Services
3283432831
x-codegen-request-body-name: body
32835-
x-unstable: '**Note**: This endpoint is in public beta.
32836-
32837-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
32832+
x-unstable: '**Note**: This endpoint is deprecated.'
3283832833
/api/v2/spans/analytics/aggregate:
3283932834
post:
3284032835
description: 'The API endpoint to aggregate spans into buckets and compute metrics

src/datadog_api_client/v2/api/incident_services_api.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict, Union
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -166,7 +167,7 @@ def create_incident_service(
166167
self,
167168
body: IncidentServiceCreateRequest,
168169
) -> IncidentServiceResponse:
169-
"""Create a new incident service.
170+
"""Create a new incident service. **Deprecated**.
170171
171172
Creates a new incident service.
172173
@@ -177,13 +178,14 @@ def create_incident_service(
177178
kwargs: Dict[str, Any] = {}
178179
kwargs["body"] = body
179180

181+
warnings.warn("create_incident_service is deprecated", DeprecationWarning, stacklevel=2)
180182
return self._create_incident_service_endpoint.call_with_http_info(**kwargs)
181183

182184
def delete_incident_service(
183185
self,
184186
service_id: str,
185187
) -> None:
186-
"""Delete an existing incident service.
188+
"""Delete an existing incident service. **Deprecated**.
187189
188190
Deletes an existing incident service.
189191
@@ -194,6 +196,7 @@ def delete_incident_service(
194196
kwargs: Dict[str, Any] = {}
195197
kwargs["service_id"] = service_id
196198

199+
warnings.warn("delete_incident_service is deprecated", DeprecationWarning, stacklevel=2)
197200
return self._delete_incident_service_endpoint.call_with_http_info(**kwargs)
198201

199202
def get_incident_service(
@@ -202,7 +205,7 @@ def get_incident_service(
202205
*,
203206
include: Union[IncidentRelatedObject, UnsetType] = unset,
204207
) -> IncidentServiceResponse:
205-
"""Get details of an incident service.
208+
"""Get details of an incident service. **Deprecated**.
206209
207210
Get details of an incident service. If the ``include[users]`` query parameter is provided,
208211
the included attribute will contain the users related to these incident services.
@@ -219,6 +222,7 @@ def get_incident_service(
219222
if include is not unset:
220223
kwargs["include"] = include
221224

225+
warnings.warn("get_incident_service is deprecated", DeprecationWarning, stacklevel=2)
222226
return self._get_incident_service_endpoint.call_with_http_info(**kwargs)
223227

224228
def list_incident_services(
@@ -229,7 +233,7 @@ def list_incident_services(
229233
page_offset: Union[int, UnsetType] = unset,
230234
filter: Union[str, UnsetType] = unset,
231235
) -> IncidentServicesResponse:
232-
"""Get a list of all incident services.
236+
"""Get a list of all incident services. **Deprecated**.
233237
234238
Get all incident services uploaded for the requesting user's organization. If the ``include[users]`` query parameter is provided, the included attribute will contain the users related to these incident services.
235239
@@ -256,14 +260,15 @@ def list_incident_services(
256260
if filter is not unset:
257261
kwargs["filter"] = filter
258262

263+
warnings.warn("list_incident_services is deprecated", DeprecationWarning, stacklevel=2)
259264
return self._list_incident_services_endpoint.call_with_http_info(**kwargs)
260265

261266
def update_incident_service(
262267
self,
263268
service_id: str,
264269
body: IncidentServiceUpdateRequest,
265270
) -> IncidentServiceResponse:
266-
"""Update an existing incident service.
271+
"""Update an existing incident service. **Deprecated**.
267272
268273
Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.
269274
@@ -278,4 +283,5 @@ def update_incident_service(
278283

279284
kwargs["body"] = body
280285

286+
warnings.warn("update_incident_service is deprecated", DeprecationWarning, stacklevel=2)
281287
return self._update_incident_service_endpoint.call_with_http_info(**kwargs)

0 commit comments

Comments
 (0)