Skip to content

Commit 19a51df

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit a73013e of spec repo (#3643)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f87447a commit 19a51df

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
@@ -20031,6 +20031,13 @@ datadog\_api\_client.v2.model.list\_service\_access\_tokens\_response module
2003120031
:members:
2003220032
:show-inheritance:
2003320033

20034+
datadog\_api\_client.v2.model.list\_shared\_dashboards\_response module
20035+
-----------------------------------------------------------------------
20036+
20037+
.. automodule:: datadog_api_client.v2.model.list_shared_dashboards_response
20038+
:members:
20039+
:show-inheritance:
20040+
2003420041
datadog\_api\_client.v2.model.list\_sourcemaps\_response module
2003520042
---------------------------------------------------------------
2003620043

@@ -37923,6 +37930,146 @@ datadog\_api\_client.v2.model.session\_id\_data module
3792337930
:members:
3792437931
:show-inheritance:
3792537932

37933+
datadog\_api\_client.v2.model.shared\_dashboard\_global\_time module
37934+
--------------------------------------------------------------------
37935+
37936+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_global_time
37937+
:members:
37938+
:show-inheritance:
37939+
37940+
datadog\_api\_client.v2.model.shared\_dashboard\_included module
37941+
----------------------------------------------------------------
37942+
37943+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included
37944+
:members:
37945+
:show-inheritance:
37946+
37947+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard module
37948+
---------------------------------------------------------------------------
37949+
37950+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard
37951+
:members:
37952+
:show-inheritance:
37953+
37954+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_attributes module
37955+
---------------------------------------------------------------------------------------
37956+
37957+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_attributes
37958+
:members:
37959+
:show-inheritance:
37960+
37961+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_dashboard\_type module
37962+
---------------------------------------------------------------------------------
37963+
37964+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_dashboard_type
37965+
:members:
37966+
:show-inheritance:
37967+
37968+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user module
37969+
----------------------------------------------------------------------
37970+
37971+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user
37972+
:members:
37973+
:show-inheritance:
37974+
37975+
datadog\_api\_client.v2.model.shared\_dashboard\_included\_user\_attributes module
37976+
----------------------------------------------------------------------------------
37977+
37978+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_included_user_attributes
37979+
:members:
37980+
:show-inheritance:
37981+
37982+
datadog\_api\_client.v2.model.shared\_dashboard\_invitee module
37983+
---------------------------------------------------------------
37984+
37985+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_invitee
37986+
:members:
37987+
:show-inheritance:
37988+
37989+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard module
37990+
-------------------------------------------------------------------------------
37991+
37992+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard
37993+
:members:
37994+
:show-inheritance:
37995+
37996+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_dashboard\_data module
37997+
-------------------------------------------------------------------------------------
37998+
37999+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_dashboard_data
38000+
:members:
38001+
:show-inheritance:
38002+
38003+
datadog\_api\_client.v2.model.shared\_dashboard\_relationship\_sharer module
38004+
----------------------------------------------------------------------------
38005+
38006+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationship_sharer
38007+
:members:
38008+
:show-inheritance:
38009+
38010+
datadog\_api\_client.v2.model.shared\_dashboard\_relationships module
38011+
---------------------------------------------------------------------
38012+
38013+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_relationships
38014+
:members:
38015+
:show-inheritance:
38016+
38017+
datadog\_api\_client.v2.model.shared\_dashboard\_response module
38018+
----------------------------------------------------------------
38019+
38020+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response
38021+
:members:
38022+
:show-inheritance:
38023+
38024+
datadog\_api\_client.v2.model.shared\_dashboard\_response\_attributes module
38025+
----------------------------------------------------------------------------
38026+
38027+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_response_attributes
38028+
:members:
38029+
:show-inheritance:
38030+
38031+
datadog\_api\_client.v2.model.shared\_dashboard\_selectable\_template\_variable module
38032+
--------------------------------------------------------------------------------------
38033+
38034+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_selectable_template_variable
38035+
:members:
38036+
:show-inheritance:
38037+
38038+
datadog\_api\_client.v2.model.shared\_dashboard\_share\_type module
38039+
-------------------------------------------------------------------
38040+
38041+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_share_type
38042+
:members:
38043+
:show-inheritance:
38044+
38045+
datadog\_api\_client.v2.model.shared\_dashboard\_status module
38046+
--------------------------------------------------------------
38047+
38048+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_status
38049+
:members:
38050+
:show-inheritance:
38051+
38052+
datadog\_api\_client.v2.model.shared\_dashboard\_type module
38053+
------------------------------------------------------------
38054+
38055+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_type
38056+
:members:
38057+
:show-inheritance:
38058+
38059+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences module
38060+
----------------------------------------------------------------------------
38061+
38062+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences
38063+
:members:
38064+
:show-inheritance:
38065+
38066+
datadog\_api\_client.v2.model.shared\_dashboard\_viewing\_preferences\_theme module
38067+
-----------------------------------------------------------------------------------
38068+
38069+
.. automodule:: datadog_api_client.v2.model.shared_dashboard_viewing_preferences_theme
38070+
:members:
38071+
:show-inheritance:
38072+
3792638073
datadog\_api\_client.v2.model.shift module
3792738074
------------------------------------------
3792838075

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
@@ -475,6 +475,7 @@ def __init__(
475475
"v2.list_csm_agentless_hosts": False,
476476
"v2.list_csm_unified_host_facets": False,
477477
"v2.list_csm_unified_hosts": False,
478+
"v2.list_shared_dashboards_by_dashboard_id": False,
478479
"v2.create_dashboard_secure_embed": False,
479480
"v2.delete_dashboard_secure_embed": False,
480481
"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
@@ -169,6 +170,7 @@
169170
"DORAMetricsApi",
170171
"DashboardListsApi",
171172
"DashboardSecureEmbedApi",
173+
"DashboardSharingApi",
172174
"DashboardsApi",
173175
"DataDeletionApi",
174176
"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)