-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 9b2cbc49 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jul 30, 2024
1 parent
f33e892
commit f1f30ad
Showing
21 changed files
with
526 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
examples/v2/network-device-monitoring/ListDeviceUserTags.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Get the list of tags for a device returns "OK" response | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = NetworkDeviceMonitoringApi(api_client) | ||
response = api_instance.list_device_user_tags( | ||
device_id="default_device", | ||
) | ||
|
||
print(response) |
29 changes: 29 additions & 0 deletions
29
examples/v2/network-device-monitoring/UpdateDeviceUserTags.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
Update the tags for a device returns "OK" response | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi | ||
from datadog_api_client.v2.model.list_tags_response import ListTagsResponse | ||
from datadog_api_client.v2.model.list_tags_response_data import ListTagsResponseData | ||
from datadog_api_client.v2.model.list_tags_response_data_attributes import ListTagsResponseDataAttributes | ||
|
||
body = ListTagsResponse( | ||
data=ListTagsResponseData( | ||
attributes=ListTagsResponseDataAttributes( | ||
tags=[ | ||
"tag:test", | ||
"tag:testbis", | ||
], | ||
), | ||
id="default_device", | ||
type="tags", | ||
), | ||
) | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = NetworkDeviceMonitoringApi(api_client) | ||
response = api_instance.update_device_user_tags(device_id="default_device", body=body) | ||
|
||
print(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.list_tags_response_data import ListTagsResponseData | ||
|
||
|
||
class ListTagsResponse(ModelNormal): | ||
@cached_property | ||
def openapi_types(_): | ||
from datadog_api_client.v2.model.list_tags_response_data import ListTagsResponseData | ||
|
||
return { | ||
"data": (ListTagsResponseData,), | ||
} | ||
|
||
attribute_map = { | ||
"data": "data", | ||
} | ||
|
||
def __init__(self_, data: Union[ListTagsResponseData, UnsetType] = unset, **kwargs): | ||
""" | ||
List tags response. | ||
:param data: The list tags response data. | ||
:type data: ListTagsResponseData, optional | ||
""" | ||
if data is not unset: | ||
kwargs["data"] = data | ||
super().__init__(kwargs) |
Oops, something went wrong.