Skip to content

Commit 65517bc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 61ef306 of spec repo
1 parent 068d9b5 commit 65517bc

43 files changed

Lines changed: 3098 additions & 78 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 852 additions & 62 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get a device returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_eudm_device"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = EndUserDeviceMonitoringApi(api_client)
12+
response = api_instance.get_eudm_device(
13+
device_id="device_id",
14+
)
15+
16+
print(response)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Get all devices returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_eudm_devices"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = EndUserDeviceMonitoringApi(api_client)
12+
response = api_instance.get_eudm_devices()
13+
14+
print(response)

‎src/datadog_api_client/configuration.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,8 @@ def __init__(
602602
"v2.trigger_deployment_gates_evaluation": False,
603603
"v2.update_deployment_gate": False,
604604
"v2.update_deployment_rule": False,
605+
"v2.get_eudm_device": False,
606+
"v2.get_eudm_devices": False,
605607
"v2.clone_form": False,
606608
"v2.create_and_publish_form": False,
607609
"v2.create_form": False,
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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, List, Union
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.model_utils import (
11+
UnsetType,
12+
unset,
13+
)
14+
from datadog_api_client.v2.model.device_base_array import DeviceBaseArray
15+
from datadog_api_client.v2.model.device_details import DeviceDetails
16+
17+
18+
class EndUserDeviceMonitoringApi:
19+
"""
20+
Inspect devices reported by the Datadog Agent on end-user laptops, desktops,
21+
and mobile devices, including their health, hardware, and connectivity attributes.
22+
"""
23+
24+
def __init__(self, api_client=None):
25+
if api_client is None:
26+
api_client = ApiClient(Configuration())
27+
self.api_client = api_client
28+
29+
self._get_eudm_device_endpoint = _Endpoint(
30+
settings={
31+
"response_type": (DeviceDetails,),
32+
"auth": ["apiKeyAuth", "appKeyAuth"],
33+
"endpoint_path": "/api/v2/eudm/devices/{device_id}",
34+
"operation_id": "get_eudm_device",
35+
"http_method": "GET",
36+
"version": "v2",
37+
},
38+
params_map={
39+
"device_id": {
40+
"required": True,
41+
"openapi_types": (str,),
42+
"attribute": "device_id",
43+
"location": "path",
44+
},
45+
},
46+
headers_map={
47+
"accept": ["application/json"],
48+
},
49+
api_client=api_client,
50+
)
51+
52+
self._get_eudm_devices_endpoint = _Endpoint(
53+
settings={
54+
"response_type": (DeviceBaseArray,),
55+
"auth": ["apiKeyAuth", "appKeyAuth"],
56+
"endpoint_path": "/api/v2/eudm/devices",
57+
"operation_id": "get_eudm_devices",
58+
"http_method": "GET",
59+
"version": "v2",
60+
},
61+
params_map={
62+
"bssid": {
63+
"openapi_types": ([str],),
64+
"attribute": "bssid",
65+
"location": "query",
66+
"collection_format": "multi",
67+
},
68+
"page_limit": {
69+
"validation": {
70+
"inclusive_minimum": 1,
71+
},
72+
"openapi_types": (int,),
73+
"attribute": "page[limit]",
74+
"location": "query",
75+
},
76+
"page_cursor": {
77+
"openapi_types": (str,),
78+
"attribute": "page[cursor]",
79+
"location": "query",
80+
},
81+
},
82+
headers_map={
83+
"accept": ["application/json"],
84+
},
85+
api_client=api_client,
86+
)
87+
88+
def get_eudm_device(
89+
self,
90+
device_id: str,
91+
) -> DeviceDetails:
92+
"""Get a device.
93+
94+
:param device_id: Unique identifier of the device to fetch. Matches the Datadog host identifier.
95+
:type device_id: str
96+
:rtype: DeviceDetails
97+
"""
98+
kwargs: Dict[str, Any] = {}
99+
kwargs["device_id"] = device_id
100+
101+
return self._get_eudm_device_endpoint.call_with_http_info(**kwargs)
102+
103+
def get_eudm_devices(
104+
self,
105+
*,
106+
bssid: Union[List[str], UnsetType] = unset,
107+
page_limit: Union[int, UnsetType] = unset,
108+
page_cursor: Union[str, UnsetType] = unset,
109+
) -> DeviceBaseArray:
110+
"""Get all devices.
111+
112+
:param bssid: Filter devices to those currently associated with any of the given BSSID values.
113+
Each value must be a MAC-48 address; repeat the parameter to pass several values.
114+
:type bssid: [str], optional
115+
:param page_limit: Maximum number of devices to return in one page. Must be a positive integer.
116+
If not set, the response contains all matching devices.
117+
:type page_limit: int, optional
118+
:param page_cursor: Opaque cursor that selects the next page. Use the ``meta.page.after`` value
119+
of the previous response. Devices are ordered by ID.
120+
:type page_cursor: str, optional
121+
:rtype: DeviceBaseArray
122+
"""
123+
kwargs: Dict[str, Any] = {}
124+
if bssid is not unset:
125+
kwargs["bssid"] = bssid
126+
127+
if page_limit is not unset:
128+
kwargs["page_limit"] = page_limit
129+
130+
if page_cursor is not unset:
131+
kwargs["page_cursor"] = page_cursor
132+
133+
return self._get_eudm_devices_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
@@ -56,6 +56,7 @@
5656
from datadog_api_client.v2.api.domain_allowlist_api import DomainAllowlistApi
5757
from datadog_api_client.v2.api.downtimes_api import DowntimesApi
5858
from datadog_api_client.v2.api.elastic_cloud_integration_api import ElasticCloudIntegrationApi
59+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
5960
from datadog_api_client.v2.api.entity_integration_configs_api import EntityIntegrationConfigsApi
6061
from datadog_api_client.v2.api.entity_risk_scores_api import EntityRiskScoresApi
6162
from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi
@@ -217,6 +218,7 @@
217218
"DomainAllowlistApi",
218219
"DowntimesApi",
219220
"ElasticCloudIntegrationApi",
221+
"EndUserDeviceMonitoringApi",
220222
"EntityIntegrationConfigsApi",
221223
"EntityRiskScoresApi",
222224
"ErrorTrackingApi",
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
date,
12+
datetime,
13+
none_type,
14+
UUID,
15+
)
16+
17+
18+
class ArbitraryRuleMappingTransform(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
return {
22+
"mapping": (
23+
{
24+
str: (
25+
bool,
26+
date,
27+
datetime,
28+
dict,
29+
float,
30+
int,
31+
list,
32+
str,
33+
UUID,
34+
none_type,
35+
)
36+
},
37+
),
38+
"synthetic_tag": (str,),
39+
}
40+
41+
attribute_map = {
42+
"mapping": "mapping",
43+
"synthetic_tag": "synthetic_tag",
44+
}
45+
46+
def __init__(self_, mapping: Dict[str, Any], synthetic_tag: str, **kwargs):
47+
"""
48+
Only supported for ``proportional_timeseries`` and ``even_timeseries`` rules. Creates a synthetic tag from timeseries input rows before ``tag_transforms`` are applied.
49+
50+
:param mapping: Recursive mapping node. Each ``match_on_values`` branch contains a value and a nested node.
51+
:type mapping: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}
52+
53+
:param synthetic_tag: The name of the synthetic tag created by the mapping.
54+
:type synthetic_tag: str
55+
"""
56+
super().__init__(kwargs)
57+
58+
self_.mapping = mapping
59+
self_.synthetic_tag = synthetic_tag

‎src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes.py‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_costs_to_allocate_items import (
1919
ArbitraryRuleResponseDataAttributesCostsToAllocateItems,
2020
)
21+
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_rule_category import (
22+
ArbitraryRuleResponseDataAttributesRuleCategory,
23+
)
2124
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy import (
2225
ArbitraryRuleResponseDataAttributesStrategy,
2326
)
@@ -35,6 +38,9 @@ def openapi_types(_):
3538
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_costs_to_allocate_items import (
3639
ArbitraryRuleResponseDataAttributesCostsToAllocateItems,
3740
)
41+
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_rule_category import (
42+
ArbitraryRuleResponseDataAttributesRuleCategory,
43+
)
3844
from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy import (
3945
ArbitraryRuleResponseDataAttributesStrategy,
4046
)
@@ -43,31 +49,39 @@ def openapi_types(_):
4349
"costs_to_allocate": ([ArbitraryRuleResponseDataAttributesCostsToAllocateItems],),
4450
"created": (datetime,),
4551
"enabled": (bool,),
52+
"is_ootb": (bool,),
4653
"last_modified_user_uuid": (str,),
4754
"order_id": (int,),
4855
"processing_status": (str,),
4956
"provider": ([str],),
5057
"rejected": (bool,),
58+
"rule_category": (ArbitraryRuleResponseDataAttributesRuleCategory,),
5159
"rule_name": (str,),
5260
"strategy": (ArbitraryRuleResponseDataAttributesStrategy,),
5361
"type": (str,),
5462
"updated": (datetime,),
63+
"valid_from_date": (datetime,),
64+
"valid_through_date": (datetime,),
5565
"version": (int,),
5666
}
5767

5868
attribute_map = {
5969
"costs_to_allocate": "costs_to_allocate",
6070
"created": "created",
6171
"enabled": "enabled",
72+
"is_ootb": "is_ootb",
6273
"last_modified_user_uuid": "last_modified_user_uuid",
6374
"order_id": "order_id",
6475
"processing_status": "processing_status",
6576
"provider": "provider",
6677
"rejected": "rejected",
78+
"rule_category": "rule_category",
6779
"rule_name": "rule_name",
6880
"strategy": "strategy",
6981
"type": "type",
7082
"updated": "updated",
83+
"valid_from_date": "valid_from_date",
84+
"valid_through_date": "valid_through_date",
7185
"version": "version",
7286
}
7387

@@ -84,8 +98,12 @@ def __init__(
8498
type: str,
8599
updated: datetime,
86100
version: int,
101+
is_ootb: Union[bool, UnsetType] = unset,
87102
processing_status: Union[str, UnsetType] = unset,
88103
rejected: Union[bool, UnsetType] = unset,
104+
rule_category: Union[ArbitraryRuleResponseDataAttributesRuleCategory, UnsetType] = unset,
105+
valid_from_date: Union[datetime, UnsetType] = unset,
106+
valid_through_date: Union[datetime, UnsetType] = unset,
89107
**kwargs,
90108
):
91109
"""
@@ -100,6 +118,9 @@ def __init__(
100118
:param enabled: The ``attributes`` ``enabled``.
101119
:type enabled: bool
102120
121+
:param is_ootb: Whether the rule is an out-of-the-box rule provided by Datadog. Omitted when ``false``.
122+
:type is_ootb: bool, optional
123+
103124
:param last_modified_user_uuid: The ``attributes`` ``last_modified_user_uuid``.
104125
:type last_modified_user_uuid: str
105126
@@ -115,6 +136,9 @@ def __init__(
115136
:param rejected: The ``attributes`` ``rejected``.
116137
:type rejected: bool, optional
117138
139+
:param rule_category: Rule category. Omitted for custom rules.
140+
:type rule_category: ArbitraryRuleResponseDataAttributesRuleCategory, optional
141+
118142
:param rule_name: The ``attributes`` ``rule_name``.
119143
:type rule_name: str
120144
@@ -127,13 +151,27 @@ def __init__(
127151
:param updated: The ``attributes`` ``updated``.
128152
:type updated: datetime
129153
154+
:param valid_from_date: The first date the rule applies to. Omitted when the rule has no start date.
155+
:type valid_from_date: datetime, optional
156+
157+
:param valid_through_date: The last date the rule applies to. Omitted when the rule has no end date.
158+
:type valid_through_date: datetime, optional
159+
130160
:param version: The ``attributes`` ``version``.
131161
:type version: int
132162
"""
163+
if is_ootb is not unset:
164+
kwargs["is_ootb"] = is_ootb
133165
if processing_status is not unset:
134166
kwargs["processing_status"] = processing_status
135167
if rejected is not unset:
136168
kwargs["rejected"] = rejected
169+
if rule_category is not unset:
170+
kwargs["rule_category"] = rule_category
171+
if valid_from_date is not unset:
172+
kwargs["valid_from_date"] = valid_from_date
173+
if valid_through_date is not unset:
174+
kwargs["valid_through_date"] = valid_through_date
137175
super().__init__(kwargs)
138176

139177
self_.costs_to_allocate = costs_to_allocate

0 commit comments

Comments
 (0)