Skip to content

Commit d16e8bc

Browse files
azure-sdkChenxiJiang333msyyc
authored
[AutoRelease] t2-dashboard-2025-07-21-64601(can only be merged by SDK owner) (#42115)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md * code and test * update changelog * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: Yuchao Yan <[email protected]>
1 parent 000ea52 commit d16e8bc

File tree

90 files changed

+13532
-12231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+13532
-12231
lines changed

sdk/dashboard/azure-mgmt-dashboard/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Release History
22

3+
## 2.0.0b1 (2025-07-31)
4+
5+
### Features Added
6+
7+
- Client `DashboardManagementClient` added operation group `integration_fabrics`
8+
- Client `DashboardManagementClient` added operation group `managed_dashboards`
9+
- Model `GrafanaConfigurations` added property `snapshots`
10+
- Model `GrafanaConfigurations` added property `users`
11+
- Model `GrafanaConfigurations` added property `security`
12+
- Model `GrafanaConfigurations` added property `unified_alerting_screenshots`
13+
- Added model `IntegrationFabric`
14+
- Added model `IntegrationFabricProperties`
15+
- Added model `IntegrationFabricPropertiesUpdateParameters`
16+
- Added model `IntegrationFabricUpdateParameters`
17+
- Added model `ManagedDashboard`
18+
- Added model `ManagedDashboardProperties`
19+
- Added model `ManagedDashboardUpdateParameters`
20+
- Added model `ProxyResource`
21+
- Added model `Security`
22+
- Added model `Snapshots`
23+
- Added model `UnifiedAlertingScreenshots`
24+
- Added model `Users`
25+
- Operation group `GrafanaOperations` added method `begin_update`
26+
- Added operation group `IntegrationFabricsOperations`
27+
- Added operation group `ManagedDashboardsOperations`
28+
29+
### Breaking Changes
30+
31+
- This version introduces new hybrid models which have dual dictionary and model nature. And please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
32+
- Deleted or renamed model `ManagedGrafanaListResponse`
33+
- Deleted or renamed model `ManagedPrivateEndpointModelListResponse`
34+
- Deleted or renamed method `GrafanaOperations.update`
35+
336
## 1.1.0 (2023-11-20)
437

538
### Features Added
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
2-
"commit": "702c8df64d1b5730e150955e0d5dcf244fdf5208",
2+
"apiVersion": "2024-11-01-preview",
3+
"commit": "0a8628b33f8e51b56304d616b8b50be6fa158fb3",
34
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/[email protected]",
7-
"@autorest/[email protected]"
8-
],
9-
"autorest_command": "autorest specification/dashboard/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/dashboard/resource-manager/readme.md"
5+
"typespec_src": "specification/dashboard/Dashboard.Management",
6+
"emitterVersion": "0.47.0"
117
}

sdk/dashboard/azure-mgmt-dashboard/apiview-properties.json

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

sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._dashboard_management_client import DashboardManagementClient # type: ignore
15+
from ._client import DashboardManagementClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION
Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -17,11 +17,9 @@
1717
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1818
from azure.mgmt.core.tools import get_arm_endpoints
1919

20-
from . import models as _models
2120
from ._configuration import DashboardManagementClientConfiguration
2221
from ._utils.serialization import Deserializer, Serializer
2322
from .operations import (
24-
DashboardsOperations,
2523
GrafanaOperations,
2624
IntegrationFabricsOperations,
2725
ManagedDashboardsOperations,
@@ -40,30 +38,29 @@ class DashboardManagementClient: # pylint: disable=too-many-instance-attributes
4038
4139
:ivar operations: Operations operations
4240
:vartype operations: azure.mgmt.dashboard.operations.Operations
43-
:ivar grafana: GrafanaOperations operations
44-
:vartype grafana: azure.mgmt.dashboard.operations.GrafanaOperations
4541
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
4642
:vartype private_endpoint_connections:
4743
azure.mgmt.dashboard.operations.PrivateEndpointConnectionsOperations
4844
:ivar private_link_resources: PrivateLinkResourcesOperations operations
4945
:vartype private_link_resources: azure.mgmt.dashboard.operations.PrivateLinkResourcesOperations
50-
:ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
51-
:vartype managed_private_endpoints:
52-
azure.mgmt.dashboard.operations.ManagedPrivateEndpointsOperations
5346
:ivar integration_fabrics: IntegrationFabricsOperations operations
5447
:vartype integration_fabrics: azure.mgmt.dashboard.operations.IntegrationFabricsOperations
55-
:ivar dashboards: DashboardsOperations operations
56-
:vartype dashboards: azure.mgmt.dashboard.operations.DashboardsOperations
5748
:ivar managed_dashboards: ManagedDashboardsOperations operations
5849
:vartype managed_dashboards: azure.mgmt.dashboard.operations.ManagedDashboardsOperations
59-
:param credential: Credential needed for the client to connect to Azure. Required.
50+
:ivar grafana: GrafanaOperations operations
51+
:vartype grafana: azure.mgmt.dashboard.operations.GrafanaOperations
52+
:ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
53+
:vartype managed_private_endpoints:
54+
azure.mgmt.dashboard.operations.ManagedPrivateEndpointsOperations
55+
:param credential: Credential used to authenticate requests to the service. Required.
6056
:type credential: ~azure.core.credentials.TokenCredential
61-
:param subscription_id: The ID of the target subscription. Required.
57+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6258
:type subscription_id: str
63-
:param base_url: Service URL. Default value is None.
59+
:param base_url: Service host. Default value is None.
6460
:type base_url: str
65-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
66-
this default value may result in unsupported behavior.
61+
:keyword api_version: The API version to use for this operation. Default value is
62+
"2024-11-01-preview". Note that overriding this default value may result in unsupported
63+
behavior.
6764
:paramtype api_version: str
6865
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6966
Retry-After header is present.
@@ -72,13 +69,18 @@ class DashboardManagementClient: # pylint: disable=too-many-instance-attributes
7269
def __init__(
7370
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7471
) -> None:
72+
_endpoint = "{endpoint}"
7573
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
7674
_endpoints = get_arm_endpoints(_cloud)
7775
if not base_url:
7876
base_url = _endpoints["resource_manager"]
7977
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
8078
self._config = DashboardManagementClientConfiguration(
81-
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
79+
credential=credential,
80+
subscription_id=subscription_id,
81+
base_url=cast(str, base_url),
82+
credential_scopes=credential_scopes,
83+
**kwargs
8284
)
8385

8486
_policies = kwargs.pop("policies", None)
@@ -99,38 +101,36 @@ def __init__(
99101
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
100102
self._config.http_logging_policy,
101103
]
102-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
104+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
103105

104-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
105-
self._serialize = Serializer(client_models)
106-
self._deserialize = Deserializer(client_models)
106+
self._serialize = Serializer()
107+
self._deserialize = Deserializer()
107108
self._serialize.client_side_validation = False
108109
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
109-
self.grafana = GrafanaOperations(self._client, self._config, self._serialize, self._deserialize)
110110
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
111111
self._client, self._config, self._serialize, self._deserialize
112112
)
113113
self.private_link_resources = PrivateLinkResourcesOperations(
114114
self._client, self._config, self._serialize, self._deserialize
115115
)
116-
self.managed_private_endpoints = ManagedPrivateEndpointsOperations(
117-
self._client, self._config, self._serialize, self._deserialize
118-
)
119116
self.integration_fabrics = IntegrationFabricsOperations(
120117
self._client, self._config, self._serialize, self._deserialize
121118
)
122-
self.dashboards = DashboardsOperations(self._client, self._config, self._serialize, self._deserialize)
123119
self.managed_dashboards = ManagedDashboardsOperations(
124120
self._client, self._config, self._serialize, self._deserialize
125121
)
122+
self.grafana = GrafanaOperations(self._client, self._config, self._serialize, self._deserialize)
123+
self.managed_private_endpoints = ManagedPrivateEndpointsOperations(
124+
self._client, self._config, self._serialize, self._deserialize
125+
)
126126

127-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
127+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
128128
"""Runs the network request through the client's chained policies.
129129
130130
>>> from azure.core.rest import HttpRequest
131131
>>> request = HttpRequest("GET", "https://www.example.org/")
132132
<HttpRequest [GET], url: 'https://www.example.org/'>
133-
>>> response = client._send_request(request)
133+
>>> response = client.send_request(request)
134134
<HttpResponse: 200 OK>
135135
136136
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -143,7 +143,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
143143
"""
144144

145145
request_copy = deepcopy(request)
146-
request_copy.url = self._client.format_url(request_copy.url)
146+
path_format_arguments = {
147+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
148+
}
149+
150+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
147151
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
148152

149153
def close(self) -> None:

sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_configuration.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -23,16 +23,25 @@ class DashboardManagementClientConfiguration: # pylint: disable=too-many-instan
2323
Note that all parameters used to create this instance are saved as instance
2424
attributes.
2525
26-
:param credential: Credential needed for the client to connect to Azure. Required.
26+
:param credential: Credential used to authenticate requests to the service. Required.
2727
:type credential: ~azure.core.credentials.TokenCredential
28-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
2929
:type subscription_id: str
30-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
31-
this default value may result in unsupported behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is
33+
"2024-11-01-preview". Note that overriding this default value may result in unsupported
34+
behavior.
3235
:paramtype api_version: str
3336
"""
3437

35-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38+
def __init__(
39+
self,
40+
credential: "TokenCredential",
41+
subscription_id: str,
42+
base_url: str = "https://management.azure.com",
43+
**kwargs: Any
44+
) -> None:
3645
api_version: str = kwargs.pop("api_version", "2024-11-01-preview")
3746

3847
if credential is None:
@@ -42,6 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4251

4352
self.credential = credential
4453
self.subscription_id = subscription_id
54+
self.base_url = base_url
4555
self.api_version = api_version
4656
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4757
kwargs.setdefault("sdk_moniker", "mgmt-dashboard/{}".format(VERSION))
Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
#
43
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
265
# --------------------------------------------------------------------------
6+
"""Customize generated code here.
7+
8+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9+
"""
10+
from typing import List
11+
12+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
2713

2814

29-
# This file is used for handwritten extensions to the generated code. Example:
30-
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3115
def patch_sdk():
32-
pass
16+
"""Do not remove from this file.
17+
18+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
19+
you can't accomplish using the techniques described in
20+
https://aka.ms/azsdk/python/dpcodegen/python/customize
21+
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# --------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# Code generated by Microsoft (R) AutoRest Code Generator.
4+
# Code generated by Microsoft (R) Python Code Generator.
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)