Skip to content

Commit d66117f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f0355b7 of spec repo
1 parent 9fa4783 commit d66117f

16 files changed

Lines changed: 445 additions & 16 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51339,6 +51339,49 @@ components:
5133951339
$ref: '#/components/schemas/ServiceDefinitionData'
5134051340
type: array
5134151341
type: object
51342+
ServiceList:
51343+
properties:
51344+
data:
51345+
$ref: '#/components/schemas/ServiceListData'
51346+
type: object
51347+
ServiceListData:
51348+
properties:
51349+
attributes:
51350+
$ref: '#/components/schemas/ServiceListDataAttributes'
51351+
id:
51352+
type: string
51353+
type:
51354+
$ref: '#/components/schemas/ServiceListDataType'
51355+
required:
51356+
- type
51357+
type: object
51358+
ServiceListDataAttributes:
51359+
properties:
51360+
metadata:
51361+
items:
51362+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51363+
type: array
51364+
services:
51365+
items:
51366+
type: string
51367+
type: array
51368+
type: object
51369+
ServiceListDataAttributesMetadataItems:
51370+
properties:
51371+
isTraced:
51372+
type: boolean
51373+
isUsm:
51374+
type: boolean
51375+
type: object
51376+
ServiceListDataType:
51377+
default: services_list
51378+
description: Services list resource type.
51379+
enum:
51380+
- services_list
51381+
example: services_list
51382+
type: string
51383+
x-enum-varnames:
51384+
- SERVICES_LIST
5134251385
ServiceNowBasicAuth:
5134351386
description: The definition of the `ServiceNowBasicAuth` object.
5134451387
properties:
@@ -61601,6 +61644,26 @@ paths:
6160161644
permissions:
6160261645
- apm_retention_filter_write
6160361646
- apm_pipelines_write
61647+
/api/v2/apm/services:
61648+
get:
61649+
operationId: GetServiceList
61650+
responses:
61651+
'200':
61652+
content:
61653+
application/json:
61654+
schema:
61655+
$ref: '#/components/schemas/ServiceList'
61656+
description: OK
61657+
'429':
61658+
$ref: '#/components/responses/TooManyRequestsResponse'
61659+
security:
61660+
- apiKeyAuth: []
61661+
appKeyAuth: []
61662+
- AuthZ:
61663+
- apm_read
61664+
summary: Get service list
61665+
tags:
61666+
- APM
6160461667
/api/v2/app-builder/apps:
6160561668
delete:
6160661669
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69334,9 +69397,6 @@ paths:
6933469397
operator: OR
6933569398
permissions:
6933669399
- incident_read
69337-
x-unstable: '**Note**: This endpoint is in Preview.
69338-
69339-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6934069400
post:
6934169401
description: Create an impact for an incident.
6934269402
operationId: CreateIncidentImpact
@@ -69380,9 +69440,6 @@ paths:
6938069440
operator: OR
6938169441
permissions:
6938269442
- incident_write
69383-
x-unstable: '**Note**: This endpoint is in Preview.
69384-
69385-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6938669443
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6938769444
delete:
6938869445
description: Delete an incident impact.
@@ -69413,9 +69470,6 @@ paths:
6941369470
operator: OR
6941469471
permissions:
6941569472
- incident_write
69416-
x-unstable: '**Note**: This endpoint is in Preview.
69417-
69418-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6941969473
/api/v2/incidents/{incident_id}/relationships/integrations:
6942069474
get:
6942169475
description: Get all integration metadata for an incident.
@@ -88586,6 +88640,9 @@ servers:
8858688640
tags:
8858788641
- description: Configure your API endpoints through the Datadog API.
8858888642
name: API Management
88643+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88644+
telemetry in context
88645+
name: APM
8858988646
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8859088647
for your organization. You need an API and application key with Admin rights to
8859188648
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ datadog\_api\_client.v2.api.api\_management\_api module
3232
:members:
3333
:show-inheritance:
3434

35+
datadog\_api\_client.v2.api.apm\_api module
36+
-------------------------------------------
37+
38+
.. automodule:: datadog_api_client.v2.api.apm_api
39+
:members:
40+
:show-inheritance:
41+
3542
datadog\_api\_client.v2.api.apm\_retention\_filters\_api module
3643
---------------------------------------------------------------
3744

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22551,6 +22551,41 @@ datadog\_api\_client.v2.model.service\_definitions\_list\_response module
2255122551
:members:
2255222552
:show-inheritance:
2255322553

22554+
datadog\_api\_client.v2.model.service\_list module
22555+
--------------------------------------------------
22556+
22557+
.. automodule:: datadog_api_client.v2.model.service_list
22558+
:members:
22559+
:show-inheritance:
22560+
22561+
datadog\_api\_client.v2.model.service\_list\_data module
22562+
--------------------------------------------------------
22563+
22564+
.. automodule:: datadog_api_client.v2.model.service_list_data
22565+
:members:
22566+
:show-inheritance:
22567+
22568+
datadog\_api\_client.v2.model.service\_list\_data\_attributes module
22569+
--------------------------------------------------------------------
22570+
22571+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes
22572+
:members:
22573+
:show-inheritance:
22574+
22575+
datadog\_api\_client.v2.model.service\_list\_data\_attributes\_metadata\_items module
22576+
-------------------------------------------------------------------------------------
22577+
22578+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes_metadata_items
22579+
:members:
22580+
:show-inheritance:
22581+
22582+
datadog\_api\_client.v2.model.service\_list\_data\_type module
22583+
--------------------------------------------------------------
22584+
22585+
.. automodule:: datadog_api_client.v2.model.service_list_data_type
22586+
:members:
22587+
:show-inheritance:
22588+
2255422589
datadog\_api\_client.v2.model.service\_now\_basic\_auth module
2255522590
--------------------------------------------------------------
2255622591

examples/v2/apm/GetServiceList.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get service list returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.apm_api import APMApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = APMApi(api_client)
11+
response = api_instance.get_service_list()
12+
13+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,12 @@ def __init__(
307307
"v2.update_deployment_gate": False,
308308
"v2.update_deployment_rule": False,
309309
"v2.create_incident": False,
310-
"v2.create_incident_impact": False,
311310
"v2.create_incident_integration": False,
312311
"v2.create_incident_notification_rule": False,
313312
"v2.create_incident_notification_template": False,
314313
"v2.create_incident_todo": False,
315314
"v2.create_incident_type": False,
316315
"v2.delete_incident": False,
317-
"v2.delete_incident_impact": False,
318316
"v2.delete_incident_integration": False,
319317
"v2.delete_incident_notification_rule": False,
320318
"v2.delete_incident_notification_template": False,
@@ -327,7 +325,6 @@ def __init__(
327325
"v2.get_incident_todo": False,
328326
"v2.get_incident_type": False,
329327
"v2.list_incident_attachments": False,
330-
"v2.list_incident_impacts": False,
331328
"v2.list_incident_integrations": False,
332329
"v2.list_incident_notification_rules": False,
333330
"v2.list_incident_notification_templates": False,
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.v2.model.service_list import ServiceList
11+
12+
13+
class APMApi:
14+
"""
15+
Observe, troubleshoot, and improve cloud-scale applications with all telemetry in context
16+
"""
17+
18+
def __init__(self, api_client=None):
19+
if api_client is None:
20+
api_client = ApiClient(Configuration())
21+
self.api_client = api_client
22+
23+
self._get_service_list_endpoint = _Endpoint(
24+
settings={
25+
"response_type": (ServiceList,),
26+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
27+
"endpoint_path": "/api/v2/apm/services",
28+
"operation_id": "get_service_list",
29+
"http_method": "GET",
30+
"version": "v2",
31+
},
32+
params_map={},
33+
headers_map={
34+
"accept": ["application/json"],
35+
},
36+
api_client=api_client,
37+
)
38+
39+
def get_service_list(
40+
self,
41+
) -> ServiceList:
42+
"""Get service list.
43+
44+
:rtype: ServiceList
45+
"""
46+
kwargs: Dict[str, Any] = {}
47+
return self._get_service_list_endpoint.call_with_http_info(**kwargs)

src/datadog_api_client/v2/apis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from datadog_api_client.v2.api.api_management_api import APIManagementApi
2+
from datadog_api_client.v2.api.apm_api import APMApi
23
from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi
34
from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi
45
from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi
@@ -86,6 +87,7 @@
8687

8788
__all__ = [
8889
"APIManagementApi",
90+
"APMApi",
8991
"APMRetentionFiltersApi",
9092
"AWSIntegrationApi",
9193
"AWSLogsIntegrationApi",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.service_list_data import ServiceListData
18+
19+
20+
class ServiceList(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.service_list_data import ServiceListData
24+
25+
return {
26+
"data": (ServiceListData,),
27+
}
28+
29+
attribute_map = {
30+
"data": "data",
31+
}
32+
33+
def __init__(self_, data: Union[ServiceListData, UnsetType] = unset, **kwargs):
34+
"""
35+
36+
37+
:param data:
38+
:type data: ServiceListData, optional
39+
"""
40+
if data is not unset:
41+
kwargs["data"] = data
42+
super().__init__(kwargs)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
18+
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType
19+
20+
21+
class ServiceListData(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
25+
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType
26+
27+
return {
28+
"attributes": (ServiceListDataAttributes,),
29+
"id": (str,),
30+
"type": (ServiceListDataType,),
31+
}
32+
33+
attribute_map = {
34+
"attributes": "attributes",
35+
"id": "id",
36+
"type": "type",
37+
}
38+
39+
def __init__(
40+
self_,
41+
type: ServiceListDataType,
42+
attributes: Union[ServiceListDataAttributes, UnsetType] = unset,
43+
id: Union[str, UnsetType] = unset,
44+
**kwargs,
45+
):
46+
"""
47+
48+
49+
:param attributes:
50+
:type attributes: ServiceListDataAttributes, optional
51+
52+
:param id:
53+
:type id: str, optional
54+
55+
:param type: Services list resource type.
56+
:type type: ServiceListDataType
57+
"""
58+
if attributes is not unset:
59+
kwargs["attributes"] = attributes
60+
if id is not unset:
61+
kwargs["id"] = id
62+
super().__init__(kwargs)
63+
64+
self_.type = type

0 commit comments

Comments
 (0)