Skip to content

Commit 10c4961

Browse files
[AutoRelease] t2-monitor-2025-06-16-15036(can only be merged by SDK owner) (#41589)
* code and test * update changelog * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 5a5c284 commit 10c4961

File tree

205 files changed

+4363
-1039
lines changed

Some content is hidden

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

205 files changed

+4363
-1039
lines changed

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

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

3+
## 7.0.0b2 (2025-06-16)
4+
5+
### Features Added
6+
7+
- Client `MonitorManagementClient` added operation group `azure_monitor_workspaces`
8+
- Client `MonitorManagementClient` added operation group `monitor_operations`
9+
- Enum `ProvisioningState` added member `CREATING`
10+
- Enum `ProvisioningState` added member `DELETING`
11+
- Added enum `ActionType`
12+
- Added model `AzureMonitorWorkspace`
13+
- Added model `AzureMonitorWorkspaceDefaultIngestionSettings`
14+
- Added model `AzureMonitorWorkspaceMetrics`
15+
- Added model `AzureMonitorWorkspaceResource`
16+
- Added model `AzureMonitorWorkspaceResourceForUpdate`
17+
- Added model `AzureMonitorWorkspaceResourceListResult`
18+
- Added model `AzureMonitorWorkspaceResourceProperties`
19+
- Added model `ErrorDetailAutoGenerated`
20+
- Added model `ErrorResponseAutoGenerated3`
21+
- Added model `IngestionSettings`
22+
- Added model `Metrics`
23+
- Added model `OperationAutoGenerated`
24+
- Added model `OperationDisplayAutoGenerated`
25+
- Added model `OperationListResultAutoGenerated`
26+
- Added enum `Origin`
27+
- Added model `PrivateEndpoint`
28+
- Added model `PrivateEndpointConnectionAutoGenerated`
29+
- Added enum `PrivateEndpointConnectionProvisioningState`
30+
- Added enum `PrivateEndpointServiceConnectionStatus`
31+
- Added model `PrivateLinkServiceConnectionState`
32+
- Added enum `PublicNetworkAccess`
33+
- Added model `ResourceAutoGenerated4`
34+
- Added model `ResourceAutoGenerated5`
35+
- Added model `TrackedResource`
36+
- Added operation group `AzureMonitorWorkspacesOperations`
37+
- Added operation group `MonitorOperationsOperations`
38+
339
## 7.0.0b1 (2025-02-08)
440

541
### Features Added

sdk/monitor/azure-mgmt-monitor/MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include _meta.json
21
recursive-include tests *.py *.json
32
recursive-include samples *.py *.md
43
include *.md

sdk/monitor/azure-mgmt-monitor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Monitor Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "a86a97dd03e0b9e692b5583e369feec3a579ef55",
2+
"commit": "292e6eee612b2a1b0bc558fec33bcbca9acb590e",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.35.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/monitor/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 --tag=package-python-sdk-for-cli-only --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/monitor/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 --tag=package-python-sdk-for-cli-only --use=@autorest/python@6.35.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/monitor/resource-manager/readme.md"
1111
}

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import MonitorManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ActionGroupsOperations,
2325
ActivityLogAlertsOperations,
2426
ActivityLogsOperations,
2527
AlertRuleIncidentsOperations,
2628
AutoscaleSettingsOperations,
29+
AzureMonitorWorkspacesOperations,
2730
BaselinesOperations,
2831
DiagnosticSettingsCategoryOperations,
2932
DiagnosticSettingsOperations,
@@ -36,6 +39,7 @@
3639
MetricDefinitionsOperations,
3740
MetricNamespacesOperations,
3841
MetricsOperations,
42+
MonitorOperationsOperations,
3943
Operations,
4044
PredictiveMetricOperations,
4145
PrivateEndpointConnectionsOperations,
@@ -124,26 +128,33 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key
124128
:ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations
125129
:vartype subscription_diagnostic_settings:
126130
azure.mgmt.monitor.operations.SubscriptionDiagnosticSettingsOperations
131+
:ivar azure_monitor_workspaces: AzureMonitorWorkspacesOperations operations
132+
:vartype azure_monitor_workspaces:
133+
azure.mgmt.monitor.operations.AzureMonitorWorkspacesOperations
134+
:ivar monitor_operations: MonitorOperationsOperations operations
135+
:vartype monitor_operations: azure.mgmt.monitor.operations.MonitorOperationsOperations
127136
:param credential: Credential needed for the client to connect to Azure. Required.
128137
:type credential: ~azure.core.credentials.TokenCredential
129138
:param subscription_id: The ID of the target subscription. Required.
130139
:type subscription_id: str
131-
:param base_url: Service URL. Default value is "https://management.azure.com".
140+
:param base_url: Service URL. Default value is None.
132141
:type base_url: str
133142
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
134143
Retry-After header is present.
135144
"""
136145

137146
def __init__(
138-
self,
139-
credential: "TokenCredential",
140-
subscription_id: str,
141-
base_url: str = "https://management.azure.com",
142-
**kwargs: Any
147+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
143148
) -> None:
149+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
150+
_endpoints = get_arm_endpoints(_cloud)
151+
if not base_url:
152+
base_url = _endpoints["resource_manager"]
153+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
144154
self._config = MonitorManagementClientConfiguration(
145-
credential=credential, subscription_id=subscription_id, **kwargs
155+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
146156
)
157+
147158
_policies = kwargs.pop("policies", None)
148159
if _policies is None:
149160
_policies = [
@@ -162,7 +173,7 @@ def __init__(
162173
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
163174
self._config.http_logging_policy,
164175
]
165-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
176+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
166177

167178
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
168179
self._serialize = Serializer(client_models)
@@ -239,6 +250,12 @@ def __init__(
239250
self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations(
240251
self._client, self._config, self._serialize, self._deserialize
241252
)
253+
self.azure_monitor_workspaces = AzureMonitorWorkspacesOperations(
254+
self._client, self._config, self._serialize, self._deserialize
255+
)
256+
self.monitor_operations = MonitorOperationsOperations(
257+
self._client, self._config, self._serialize, self._deserialize
258+
)
242259

243260
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
244261
"""Runs the network request through the client's chained policies.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)