Skip to content

Commit a19a883

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a6b6583 of spec repo
1 parent 719a01b commit a19a883

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

@@ -37566,6 +37573,146 @@ datadog\_api\_client.v2.model.session\_id\_data module
3756637573
:members:
3756737574
:show-inheritance:
3756837575

37576+
datadog\_api\_client.v2.model.shared\_dashboard\_global\_time module
37577+
--------------------------------------------------------------------
37578+
37579+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_global_time
37580+
:members:
37581+
:show-inheritance:
37582+
37583+
datadog\_api\_client.v2.model.shared\_dashboard\_included module
37584+
----------------------------------------------------------------
37585+
37586+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included
37587+
:members:
37588+
:show-inheritance:
37589+
37590+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard module
37591+
---------------------------------------------------------------------------
37592+
37593+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard
37594+
:members:
37595+
:show-inheritance:
37596+
37597+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_attributes module
37598+
---------------------------------------------------------------------------------------
37599+
37600+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_attributes
37601+
:members:
37602+
:show-inheritance:
37603+
37604+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_type module
37605+
---------------------------------------------------------------------------------
37606+
37607+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_type
37608+
:members:
37609+
:show-inheritance:
37610+
37611+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user module
37612+
----------------------------------------------------------------------
37613+
37614+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user
37615+
:members:
37616+
:show-inheritance:
37617+
37618+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user\_attributes module
37619+
----------------------------------------------------------------------------------
37620+
37621+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user_attributes
37622+
:members:
37623+
:show-inheritance:
37624+
37625+
datadog\_api\_client.v2.model.shared\_dashboard\_invitee module
37626+
---------------------------------------------------------------
37627+
37628+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_invitee
37629+
:members:
37630+
:show-inheritance:
37631+
37632+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard module
37633+
-------------------------------------------------------------------------------
37634+
37635+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard
37636+
:members:
37637+
:show-inheritance:
37638+
37639+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard\_data module
37640+
-------------------------------------------------------------------------------------
37641+
37642+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard_data
37643+
:members:
37644+
:show-inheritance:
37645+
37646+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_sharer module
37647+
----------------------------------------------------------------------------
37648+
37649+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_sharer
37650+
:members:
37651+
:show-inheritance:
37652+
37653+
datadog\_api\_client.v2.model.shared\_dashboard\_relationships module
37654+
---------------------------------------------------------------------
37655+
37656+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationships
37657+
:members:
37658+
:show-inheritance:
37659+
37660+
datadog\_api\_client.v2.model.shared\_dashboard\_response module
37661+
----------------------------------------------------------------
37662+
37663+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response
37664+
:members:
37665+
:show-inheritance:
37666+
37667+
datadog\_api\_client.v2.model.shared\_dashboard\_response\_attributes module
37668+
----------------------------------------------------------------------------
37669+
37670+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response_attributes
37671+
:members:
37672+
:show-inheritance:
37673+
37674+
datadog\_api\_client.v2.model.shared\_dashboard\_selectable\_template\_variable module
37675+
--------------------------------------------------------------------------------------
37676+
37677+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_selectable_template_variable
37678+
:members:
37679+
:show-inheritance:
37680+
37681+
datadog\_api\_client.v2.model.shared\_dashboard\_share\_type module
37682+
-------------------------------------------------------------------
37683+
37684+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_share_type
37685+
:members:
37686+
:show-inheritance:
37687+
37688+
datadog\_api\_client.v2.model.shared\_dashboard\_status module
37689+
--------------------------------------------------------------
37690+
37691+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_status
37692+
:members:
37693+
:show-inheritance:
37694+
37695+
datadog\_api\_client.v2.model.shared\_dashboard\_type module
37696+
------------------------------------------------------------
37697+
37698+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_type
37699+
:members:
37700+
:show-inheritance:
37701+
37702+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences module
37703+
----------------------------------------------------------------------------
37704+
37705+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences
37706+
:members:
37707+
:show-inheritance:
37708+
37709+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences\_theme module
37710+
-----------------------------------------------------------------------------------
37711+
37712+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences_theme
37713+
:members:
37714+
:show-inheritance:
37715+
3756937716
datadog\_api\_client.v2.model.shift module
3757037717
------------------------------------------
3757137718

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
@@ -167,6 +168,7 @@
167168
"DORAMetricsApi",
168169
"DashboardListsApi",
169170
"DashboardSecureEmbedApi",
171+
"DashboardSharingApi",
170172
"DashboardsApi",
171173
"DataDeletionApi",
172174
"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)