Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 66 additions & 9 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51339,6 +51339,49 @@ components:
$ref: '#/components/schemas/ServiceDefinitionData'
type: array
type: object
ServiceList:
properties:
data:
$ref: '#/components/schemas/ServiceListData'
type: object
ServiceListData:
properties:
attributes:
$ref: '#/components/schemas/ServiceListDataAttributes'
id:
type: string
type:
$ref: '#/components/schemas/ServiceListDataType'
required:
- type
type: object
ServiceListDataAttributes:
properties:
metadata:
items:
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
type: array
services:
items:
type: string
type: array
type: object
ServiceListDataAttributesMetadataItems:
properties:
isTraced:
type: boolean
isUsm:
type: boolean
type: object
ServiceListDataType:
default: services_list
description: Services list resource type.
enum:
- services_list
example: services_list
type: string
x-enum-varnames:
- SERVICES_LIST
ServiceNowBasicAuth:
description: The definition of the `ServiceNowBasicAuth` object.
properties:
Expand Down Expand Up @@ -61601,6 +61644,26 @@ paths:
permissions:
- apm_retention_filter_write
- apm_pipelines_write
/api/v2/apm/services:
get:
operationId: GetServiceList
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceList'
description: OK
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- apm_read
summary: Get service list
tags:
- APM
/api/v2/app-builder/apps:
delete:
description: Delete multiple apps in a single request from a list of app IDs.
Expand Down Expand Up @@ -69334,9 +69397,6 @@ paths:
operator: OR
permissions:
- incident_read
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Create an impact for an incident.
operationId: CreateIncidentImpact
Expand Down Expand Up @@ -69380,9 +69440,6 @@ paths:
operator: OR
permissions:
- incident_write
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
delete:
description: Delete an incident impact.
Expand Down Expand Up @@ -69413,9 +69470,6 @@ paths:
operator: OR
permissions:
- incident_write
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/{incident_id}/relationships/integrations:
get:
description: Get all integration metadata for an incident.
Expand Down Expand Up @@ -88586,6 +88640,9 @@ servers:
tags:
- description: Configure your API endpoints through the Datadog API.
name: API Management
- description: Observe, troubleshoot, and improve cloud-scale applications with all
telemetry in context
name: APM
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
for your organization. You need an API and application key with Admin rights to
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ datadog\_api\_client.v2.api.api\_management\_api module
:members:
:show-inheritance:

datadog\_api\_client.v2.api.apm\_api module
-------------------------------------------

.. automodule:: datadog_api_client.v2.api.apm_api
:members:
:show-inheritance:

datadog\_api\_client.v2.api.apm\_retention\_filters\_api module
---------------------------------------------------------------

Expand Down
35 changes: 35 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22551,6 +22551,41 @@ datadog\_api\_client.v2.model.service\_definitions\_list\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_list module
--------------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_list
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_list\_data module
--------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_list_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_list\_data\_attributes module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_list_data_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_list\_data\_attributes\_metadata\_items module
-------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_list_data_attributes_metadata_items
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_list\_data\_type module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_list_data_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.service\_now\_basic\_auth module
--------------------------------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions examples/v2/apm/GetServiceList.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Get service list returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.apm_api import APMApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = APMApi(api_client)
response = api_instance.get_service_list()

print(response)
3 changes: 0 additions & 3 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,12 @@ def __init__(
"v2.update_deployment_gate": False,
"v2.update_deployment_rule": False,
"v2.create_incident": False,
"v2.create_incident_impact": False,
"v2.create_incident_integration": False,
"v2.create_incident_notification_rule": False,
"v2.create_incident_notification_template": False,
"v2.create_incident_todo": False,
"v2.create_incident_type": False,
"v2.delete_incident": False,
"v2.delete_incident_impact": False,
"v2.delete_incident_integration": False,
"v2.delete_incident_notification_rule": False,
"v2.delete_incident_notification_template": False,
Expand All @@ -327,7 +325,6 @@ def __init__(
"v2.get_incident_todo": False,
"v2.get_incident_type": False,
"v2.list_incident_attachments": False,
"v2.list_incident_impacts": False,
"v2.list_incident_integrations": False,
"v2.list_incident_notification_rules": False,
"v2.list_incident_notification_templates": False,
Expand Down
47 changes: 47 additions & 0 deletions src/datadog_api_client/v2/api/apm_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Any, Dict

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
from datadog_api_client.v2.model.service_list import ServiceList


class APMApi:
"""
Observe, troubleshoot, and improve cloud-scale applications with all telemetry in context
"""

def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient(Configuration())
self.api_client = api_client

self._get_service_list_endpoint = _Endpoint(
settings={
"response_type": (ServiceList,),
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
"endpoint_path": "/api/v2/apm/services",
"operation_id": "get_service_list",
"http_method": "GET",
"version": "v2",
},
params_map={},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

def get_service_list(
self,
) -> ServiceList:
"""Get service list.

:rtype: ServiceList
"""
kwargs: Dict[str, Any] = {}
return self._get_service_list_endpoint.call_with_http_info(**kwargs)
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/apis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from datadog_api_client.v2.api.api_management_api import APIManagementApi
from datadog_api_client.v2.api.apm_api import APMApi
from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi
from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi
from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi
Expand Down Expand Up @@ -86,6 +87,7 @@

__all__ = [
"APIManagementApi",
"APMApi",
"APMRetentionFiltersApi",
"AWSIntegrationApi",
"AWSLogsIntegrationApi",
Expand Down
42 changes: 42 additions & 0 deletions src/datadog_api_client/v2/model/service_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.service_list_data import ServiceListData


class ServiceList(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.service_list_data import ServiceListData

return {
"data": (ServiceListData,),
}

attribute_map = {
"data": "data",
}

def __init__(self_, data: Union[ServiceListData, UnsetType] = unset, **kwargs):
"""


:param data:
:type data: ServiceListData, optional
"""
if data is not unset:
kwargs["data"] = data
super().__init__(kwargs)
64 changes: 64 additions & 0 deletions src/datadog_api_client/v2/model/service_list_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType


class ServiceListData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType

return {
"attributes": (ServiceListDataAttributes,),
"id": (str,),
"type": (ServiceListDataType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(
self_,
type: ServiceListDataType,
attributes: Union[ServiceListDataAttributes, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
**kwargs,
):
"""


:param attributes:
:type attributes: ServiceListDataAttributes, optional

:param id:
:type id: str, optional

:param type: Services list resource type.
:type type: ServiceListDataType
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if id is not unset:
kwargs["id"] = id
super().__init__(kwargs)

self_.type = type
Loading