Skip to content

Commit 6efe33f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8c5fdca of spec repo
1 parent f7253f2 commit 6efe33f

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
@@ -270,6 +270,13 @@ datadog\_api\_client.v2.api.dashboard\_secure\_embed\_api module
270270
:members:
271271
:show-inheritance:
272272

273+
datadog\_api\_client.v2.api.dashboard\_sharing\_api module
274+
----------------------------------------------------------
275+
276+
.. automodule:: datadog_api_client.v2.api.dashboard_sharing_api
277+
:members:
278+
:show-inheritance:
279+
273280
datadog\_api\_client.v2.api.dashboards\_api module
274281
--------------------------------------------------
275282

docs/datadog_api_client.v2.model.rst

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

19957+
datadog\_api\_client.v2.model.list\_shared\_dashboards\_response module
19958+
-----------------------------------------------------------------------
19959+
19960+
.. automodule:: datadog_api_client.v2.model.list_shared_dashboards_response
19961+
:members:
19962+
:show-inheritance:
19963+
1995719964
datadog\_api\_client.v2.model.list\_sourcemaps\_response module
1995819965
---------------------------------------------------------------
1995919966

@@ -37776,6 +37783,146 @@ datadog\_api\_client.v2.model.session\_id\_data module
3777637783
:members:
3777737784
:show-inheritance:
3777837785

37786+
datadog\_api\_client.v2.model.shared\_dashboard\_global\_time module
37787+
--------------------------------------------------------------------
37788+
37789+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_global_time
37790+
:members:
37791+
:show-inheritance:
37792+
37793+
datadog\_api\_client.v2.model.shared\_dashboard\_included module
37794+
----------------------------------------------------------------
37795+
37796+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included
37797+
:members:
37798+
:show-inheritance:
37799+
37800+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard module
37801+
---------------------------------------------------------------------------
37802+
37803+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard
37804+
:members:
37805+
:show-inheritance:
37806+
37807+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_attributes module
37808+
---------------------------------------------------------------------------------------
37809+
37810+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_attributes
37811+
:members:
37812+
:show-inheritance:
37813+
37814+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_type module
37815+
---------------------------------------------------------------------------------
37816+
37817+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_type
37818+
:members:
37819+
:show-inheritance:
37820+
37821+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user module
37822+
----------------------------------------------------------------------
37823+
37824+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user
37825+
:members:
37826+
:show-inheritance:
37827+
37828+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user\_attributes module
37829+
----------------------------------------------------------------------------------
37830+
37831+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user_attributes
37832+
:members:
37833+
:show-inheritance:
37834+
37835+
datadog\_api\_client.v2.model.shared\_dashboard\_invitee module
37836+
---------------------------------------------------------------
37837+
37838+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_invitee
37839+
:members:
37840+
:show-inheritance:
37841+
37842+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard module
37843+
-------------------------------------------------------------------------------
37844+
37845+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard
37846+
:members:
37847+
:show-inheritance:
37848+
37849+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard\_data module
37850+
-------------------------------------------------------------------------------------
37851+
37852+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard_data
37853+
:members:
37854+
:show-inheritance:
37855+
37856+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_sharer module
37857+
----------------------------------------------------------------------------
37858+
37859+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_sharer
37860+
:members:
37861+
:show-inheritance:
37862+
37863+
datadog\_api\_client.v2.model.shared\_dashboard\_relationships module
37864+
---------------------------------------------------------------------
37865+
37866+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationships
37867+
:members:
37868+
:show-inheritance:
37869+
37870+
datadog\_api\_client.v2.model.shared\_dashboard\_response module
37871+
----------------------------------------------------------------
37872+
37873+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response
37874+
:members:
37875+
:show-inheritance:
37876+
37877+
datadog\_api\_client.v2.model.shared\_dashboard\_response\_attributes module
37878+
----------------------------------------------------------------------------
37879+
37880+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response_attributes
37881+
:members:
37882+
:show-inheritance:
37883+
37884+
datadog\_api\_client.v2.model.shared\_dashboard\_selectable\_template\_variable module
37885+
--------------------------------------------------------------------------------------
37886+
37887+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_selectable_template_variable
37888+
:members:
37889+
:show-inheritance:
37890+
37891+
datadog\_api\_client.v2.model.shared\_dashboard\_share\_type module
37892+
-------------------------------------------------------------------
37893+
37894+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_share_type
37895+
:members:
37896+
:show-inheritance:
37897+
37898+
datadog\_api\_client.v2.model.shared\_dashboard\_status module
37899+
--------------------------------------------------------------
37900+
37901+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_status
37902+
:members:
37903+
:show-inheritance:
37904+
37905+
datadog\_api\_client.v2.model.shared\_dashboard\_type module
37906+
------------------------------------------------------------
37907+
37908+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_type
37909+
:members:
37910+
:show-inheritance:
37911+
37912+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences module
37913+
----------------------------------------------------------------------------
37914+
37915+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences
37916+
:members:
37917+
:show-inheritance:
37918+
37919+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences\_theme module
37920+
-----------------------------------------------------------------------------------
37921+
37922+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences_theme
37923+
:members:
37924+
:show-inheritance:
37925+
3777937926
datadog\_api\_client.v2.model.shift module
3778037927
------------------------------------------
3778137928

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
@@ -474,6 +474,7 @@ def __init__(
474474
"v2.list_csm_agentless_hosts": False,
475475
"v2.list_csm_unified_host_facets": False,
476476
"v2.list_csm_unified_hosts": False,
477+
"v2.list_shared_dashboards_by_dashboard_id": False,
477478
"v2.create_dashboard_secure_embed": False,
478479
"v2.delete_dashboard_secure_embed": False,
479480
"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
@@ -37,6 +37,7 @@
3737
from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi
3838
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
3939
from datadog_api_client.v2.api.dashboard_secure_embed_api import DashboardSecureEmbedApi
40+
from datadog_api_client.v2.api.dashboard_sharing_api import DashboardSharingApi
4041
from datadog_api_client.v2.api.dashboards_api import DashboardsApi
4142
from datadog_api_client.v2.api.data_deletion_api import DataDeletionApi
4243
from datadog_api_client.v2.api.datasets_api import DatasetsApi
@@ -168,6 +169,7 @@
168169
"DORAMetricsApi",
169170
"DashboardListsApi",
170171
"DashboardSecureEmbedApi",
172+
"DashboardSharingApi",
171173
"DashboardsApi",
172174
"DataDeletionApi",
173175
"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)