Skip to content

Commit 939e4c9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c4abe16 of spec repo
1 parent 4342459 commit 939e4c9

16 files changed

Lines changed: 459 additions & 2 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51083,6 +51083,49 @@ components:
5108351083
$ref: '#/components/schemas/ServiceDefinitionData'
5108451084
type: array
5108551085
type: object
51086+
ServiceList:
51087+
properties:
51088+
data:
51089+
$ref: '#/components/schemas/ServiceListData'
51090+
type: object
51091+
ServiceListData:
51092+
properties:
51093+
attributes:
51094+
$ref: '#/components/schemas/ServiceListDataAttributes'
51095+
id:
51096+
type: string
51097+
type:
51098+
$ref: '#/components/schemas/ServiceListDataType'
51099+
required:
51100+
- type
51101+
type: object
51102+
ServiceListDataAttributes:
51103+
properties:
51104+
metadata:
51105+
items:
51106+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51107+
type: array
51108+
services:
51109+
items:
51110+
type: string
51111+
type: array
51112+
type: object
51113+
ServiceListDataAttributesMetadataItems:
51114+
properties:
51115+
isTraced:
51116+
type: boolean
51117+
isUsm:
51118+
type: boolean
51119+
type: object
51120+
ServiceListDataType:
51121+
default: services_list
51122+
description: Services list resource type.
51123+
enum:
51124+
- services_list
51125+
example: services_list
51126+
type: string
51127+
x-enum-varnames:
51128+
- SERVICES_LIST
5108651129
ServiceNowBasicAuth:
5108751130
description: The definition of the `ServiceNowBasicAuth` object.
5108851131
properties:
@@ -61276,6 +61319,26 @@ paths:
6127661319
permissions:
6127761320
- apm_retention_filter_write
6127861321
- apm_pipelines_write
61322+
/api/v2/apm/services:
61323+
get:
61324+
operationId: GetServiceList
61325+
responses:
61326+
'200':
61327+
content:
61328+
application/json:
61329+
schema:
61330+
$ref: '#/components/schemas/ServiceList'
61331+
description: OK
61332+
'429':
61333+
$ref: '#/components/responses/TooManyRequestsResponse'
61334+
security:
61335+
- apiKeyAuth: []
61336+
appKeyAuth: []
61337+
- AuthZ:
61338+
- apm_read
61339+
summary: Get service list
61340+
tags:
61341+
- APM
6127961342
/api/v2/app-builder/apps:
6128061343
delete:
6128161344
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69009,6 +69072,9 @@ paths:
6900969072
operator: OR
6901069073
permissions:
6901169074
- incident_read
69075+
x-unstable: '**Note**: This endpoint is in Preview.
69076+
69077+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6901269078
post:
6901369079
description: Create an impact for an incident.
6901469080
operationId: CreateIncidentImpact
@@ -69052,6 +69118,9 @@ paths:
6905269118
operator: OR
6905369119
permissions:
6905469120
- incident_write
69121+
x-unstable: '**Note**: This endpoint is in Preview.
69122+
69123+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6905569124
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6905669125
delete:
6905769126
description: Delete an incident impact.
@@ -69082,6 +69151,9 @@ paths:
6908269151
operator: OR
6908369152
permissions:
6908469153
- incident_write
69154+
x-unstable: '**Note**: This endpoint is in Preview.
69155+
69156+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6908569157
/api/v2/incidents/{incident_id}/relationships/integrations:
6908669158
get:
6908769159
description: Get all integration metadata for an incident.
@@ -88017,6 +88089,9 @@ servers:
8801788089
tags:
8801888090
- description: Configure your API endpoints through the Datadog API.
8801988091
name: API Management
88092+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88093+
telemetry in context
88094+
name: APM
8802088095
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8802188096
for your organization. You need an API and application key with Admin rights to
8802288097
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
@@ -22411,6 +22411,41 @@ datadog\_api\_client.v2.model.service\_definitions\_list\_response module
2241122411
:members:
2241222412
:show-inheritance:
2241322413

22414+
datadog\_api\_client.v2.model.service\_list module
22415+
--------------------------------------------------
22416+
22417+
.. automodule:: datadog_api_client.v2.model.service_list
22418+
:members:
22419+
:show-inheritance:
22420+
22421+
datadog\_api\_client.v2.model.service\_list\_data module
22422+
--------------------------------------------------------
22423+
22424+
.. automodule:: datadog_api_client.v2.model.service_list_data
22425+
:members:
22426+
:show-inheritance:
22427+
22428+
datadog\_api\_client.v2.model.service\_list\_data\_attributes module
22429+
--------------------------------------------------------------------
22430+
22431+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes
22432+
:members:
22433+
:show-inheritance:
22434+
22435+
datadog\_api\_client.v2.model.service\_list\_data\_attributes\_metadata\_items module
22436+
-------------------------------------------------------------------------------------
22437+
22438+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes_metadata_items
22439+
:members:
22440+
:show-inheritance:
22441+
22442+
datadog\_api\_client.v2.model.service\_list\_data\_type module
22443+
--------------------------------------------------------------
22444+
22445+
.. automodule:: datadog_api_client.v2.model.service_list_data_type
22446+
:members:
22447+
:show-inheritance:
22448+
2241422449
datadog\_api\_client.v2.model.service\_now\_basic\_auth module
2241522450
--------------------------------------------------------------
2241622451

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,14 @@ 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,
310311
"v2.create_incident_integration": False,
311312
"v2.create_incident_notification_rule": False,
312313
"v2.create_incident_notification_template": False,
313314
"v2.create_incident_todo": False,
314315
"v2.create_incident_type": False,
315316
"v2.delete_incident": False,
317+
"v2.delete_incident_impact": False,
316318
"v2.delete_incident_integration": False,
317319
"v2.delete_incident_notification_rule": False,
318320
"v2.delete_incident_notification_template": False,
@@ -325,6 +327,7 @@ def __init__(
325327
"v2.get_incident_todo": False,
326328
"v2.get_incident_type": False,
327329
"v2.list_incident_attachments": False,
330+
"v2.list_incident_impacts": False,
328331
"v2.list_incident_integrations": False,
329332
"v2.list_incident_notification_rules": False,
330333
"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)