Skip to content

Commit b8a805f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e9a2b14 of spec repo
1 parent 06f047a commit b8a805f

31 files changed

Lines changed: 1864 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@ datadog\_api\_client.v2.api.dashboard\_secure\_embed\_api module
256256
:members:
257257
:show-inheritance:
258258

259+
datadog\_api\_client.v2.api.dashboard\_sharing\_api module
260+
----------------------------------------------------------
261+
262+
.. automodule:: datadog_api_client.v2.api.dashboard_sharing_api
263+
:members:
264+
:show-inheritance:
265+
259266
datadog\_api\_client.v2.api.dashboards\_api module
260267
--------------------------------------------------
261268

docs/datadog_api_client.v2.model.rst

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19716,6 +19716,13 @@ datadog\_api\_client.v2.model.list\_service\_access\_tokens\_response module
1971619716
:members:
1971719717
:show-inheritance:
1971819718

19719+
datadog\_api\_client.v2.model.list\_shared\_dashboards\_response module
19720+
-----------------------------------------------------------------------
19721+
19722+
.. automodule:: datadog_api_client.v2.model.list_shared_dashboards_response
19723+
:members:
19724+
:show-inheritance:
19725+
1971919726
datadog\_api\_client.v2.model.list\_sourcemaps\_response module
1972019727
---------------------------------------------------------------
1972119728

@@ -37104,6 +37111,146 @@ datadog\_api\_client.v2.model.session\_id\_data module
3710437111
:members:
3710537112
:show-inheritance:
3710637113

37114+
datadog\_api\_client.v2.model.shared\_dashboard\_global\_time module
37115+
--------------------------------------------------------------------
37116+
37117+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_global_time
37118+
:members:
37119+
:show-inheritance:
37120+
37121+
datadog\_api\_client.v2.model.shared\_dashboard\_included module
37122+
----------------------------------------------------------------
37123+
37124+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included
37125+
:members:
37126+
:show-inheritance:
37127+
37128+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard module
37129+
---------------------------------------------------------------------------
37130+
37131+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard
37132+
:members:
37133+
:show-inheritance:
37134+
37135+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_attributes module
37136+
---------------------------------------------------------------------------------------
37137+
37138+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_attributes
37139+
:members:
37140+
:show-inheritance:
37141+
37142+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_type module
37143+
---------------------------------------------------------------------------------
37144+
37145+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_type
37146+
:members:
37147+
:show-inheritance:
37148+
37149+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user module
37150+
----------------------------------------------------------------------
37151+
37152+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user
37153+
:members:
37154+
:show-inheritance:
37155+
37156+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user\_attributes module
37157+
----------------------------------------------------------------------------------
37158+
37159+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user_attributes
37160+
:members:
37161+
:show-inheritance:
37162+
37163+
datadog\_api\_client.v2.model.shared\_dashboard\_invitee module
37164+
---------------------------------------------------------------
37165+
37166+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_invitee
37167+
:members:
37168+
:show-inheritance:
37169+
37170+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard module
37171+
-------------------------------------------------------------------------------
37172+
37173+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard
37174+
:members:
37175+
:show-inheritance:
37176+
37177+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard\_data module
37178+
-------------------------------------------------------------------------------------
37179+
37180+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard_data
37181+
:members:
37182+
:show-inheritance:
37183+
37184+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_sharer module
37185+
----------------------------------------------------------------------------
37186+
37187+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_sharer
37188+
:members:
37189+
:show-inheritance:
37190+
37191+
datadog\_api\_client.v2.model.shared\_dashboard\_relationships module
37192+
---------------------------------------------------------------------
37193+
37194+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationships
37195+
:members:
37196+
:show-inheritance:
37197+
37198+
datadog\_api\_client.v2.model.shared\_dashboard\_response module
37199+
----------------------------------------------------------------
37200+
37201+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response
37202+
:members:
37203+
:show-inheritance:
37204+
37205+
datadog\_api\_client.v2.model.shared\_dashboard\_response\_attributes module
37206+
----------------------------------------------------------------------------
37207+
37208+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response_attributes
37209+
:members:
37210+
:show-inheritance:
37211+
37212+
datadog\_api\_client.v2.model.shared\_dashboard\_selectable\_template\_variable module
37213+
--------------------------------------------------------------------------------------
37214+
37215+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_selectable_template_variable
37216+
:members:
37217+
:show-inheritance:
37218+
37219+
datadog\_api\_client.v2.model.shared\_dashboard\_share\_type module
37220+
-------------------------------------------------------------------
37221+
37222+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_share_type
37223+
:members:
37224+
:show-inheritance:
37225+
37226+
datadog\_api\_client.v2.model.shared\_dashboard\_status module
37227+
--------------------------------------------------------------
37228+
37229+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_status
37230+
:members:
37231+
:show-inheritance:
37232+
37233+
datadog\_api\_client.v2.model.shared\_dashboard\_type module
37234+
------------------------------------------------------------
37235+
37236+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_type
37237+
:members:
37238+
:show-inheritance:
37239+
37240+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences module
37241+
----------------------------------------------------------------------------
37242+
37243+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences
37244+
:members:
37245+
:show-inheritance:
37246+
37247+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences\_theme module
37248+
-----------------------------------------------------------------------------------
37249+
37250+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences_theme
37251+
:members:
37252+
:show-inheritance:
37253+
3710737254
datadog\_api\_client.v2.model.shift module
3710837255
------------------------------------------
3710937256

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List shared dashboards for a dashboard returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.dashboard_sharing_api import DashboardSharingApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_shared_dashboards_by_dashboard_id"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = DashboardSharingApi(api_client)
12+
response = api_instance.list_shared_dashboards_by_dashboard_id(
13+
dashboard_id="abc-def-ghi",
14+
)
15+
16+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ def __init__(
464464
"v2.list_cost_tag_metadata_months": False,
465465
"v2.list_cost_tag_metadata_orchestrators": False,
466466
"v2.search_cost_recommendations": False,
467+
"v2.list_shared_dashboards_by_dashboard_id": False,
467468
"v2.create_dashboard_secure_embed": False,
468469
"v2.delete_dashboard_secure_embed": False,
469470
"v2.get_dashboard_secure_embed": False,
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.list_shared_dashboards_response import ListSharedDashboardsResponse
11+
12+
13+
class DashboardSharingApi:
14+
"""
15+
Manage dashboard sharing configurations.
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._list_shared_dashboards_by_dashboard_id_endpoint = _Endpoint(
24+
settings={
25+
"response_type": (ListSharedDashboardsResponse,),
26+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
27+
"endpoint_path": "/api/v2/dashboard/{dashboard_id}/shared",
28+
"operation_id": "list_shared_dashboards_by_dashboard_id",
29+
"http_method": "GET",
30+
"version": "v2",
31+
},
32+
params_map={
33+
"dashboard_id": {
34+
"required": True,
35+
"openapi_types": (str,),
36+
"attribute": "dashboard_id",
37+
"location": "path",
38+
},
39+
},
40+
headers_map={
41+
"accept": ["application/json"],
42+
},
43+
api_client=api_client,
44+
)
45+
46+
def list_shared_dashboards_by_dashboard_id(
47+
self,
48+
dashboard_id: str,
49+
) -> ListSharedDashboardsResponse:
50+
"""List shared dashboards for a dashboard.
51+
52+
Retrieve shared dashboards associated with the specified dashboard.
53+
54+
:param dashboard_id: ID of the dashboard.
55+
:type dashboard_id: str
56+
:rtype: ListSharedDashboardsResponse
57+
"""
58+
kwargs: Dict[str, Any] = {}
59+
kwargs["dashboard_id"] = dashboard_id
60+
61+
return self._list_shared_dashboards_by_dashboard_id_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
@@ -35,6 +35,7 @@
3535
from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi
3636
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
3737
from datadog_api_client.v2.api.dashboard_secure_embed_api import DashboardSecureEmbedApi
38+
from datadog_api_client.v2.api.dashboard_sharing_api import DashboardSharingApi
3839
from datadog_api_client.v2.api.dashboards_api import DashboardsApi
3940
from datadog_api_client.v2.api.data_deletion_api import DataDeletionApi
4041
from datadog_api_client.v2.api.datasets_api import DatasetsApi
@@ -162,6 +163,7 @@
162163
"DORAMetricsApi",
163164
"DashboardListsApi",
164165
"DashboardSecureEmbedApi",
166+
"DashboardSharingApi",
165167
"DashboardsApi",
166168
"DataDeletionApi",
167169
"DatasetsApi",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 List, Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.shared_dashboard_response import SharedDashboardResponse
16+
from datadog_api_client.v2.model.shared_dashboard_included import SharedDashboardIncluded
17+
from datadog_api_client.v2.model.shared_dashboard_included_dashboard import SharedDashboardIncludedDashboard
18+
from datadog_api_client.v2.model.shared_dashboard_included_user import SharedDashboardIncludedUser
19+
20+
21+
class ListSharedDashboardsResponse(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v2.model.shared_dashboard_response import SharedDashboardResponse
25+
from datadog_api_client.v2.model.shared_dashboard_included import SharedDashboardIncluded
26+
27+
return {
28+
"data": ([SharedDashboardResponse],),
29+
"included": ([SharedDashboardIncluded],),
30+
}
31+
32+
attribute_map = {
33+
"data": "data",
34+
"included": "included",
35+
}
36+
37+
def __init__(
38+
self_,
39+
data: List[SharedDashboardResponse],
40+
included: List[Union[SharedDashboardIncluded, SharedDashboardIncludedDashboard, SharedDashboardIncludedUser]],
41+
**kwargs,
42+
):
43+
"""
44+
Response containing shared dashboards for a dashboard.
45+
46+
:param data: Shared dashboards for the dashboard.
47+
:type data: [SharedDashboardResponse]
48+
49+
:param included: Users and dashboards related to the shared dashboards.
50+
:type included: [SharedDashboardIncluded]
51+
"""
52+
super().__init__(kwargs)
53+
54+
self_.data = data
55+
self_.included = included
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
)
10+
11+
12+
class SharedDashboardGlobalTime(ModelNormal):
13+
_nullable = True
14+
15+
def __init__(self_, **kwargs):
16+
"""
17+
Default time range configuration for the shared dashboard.
18+
"""
19+
super().__init__(kwargs)

0 commit comments

Comments
 (0)