Skip to content

Commit 4896496

Browse files
[AutoRelease] t2-loganalytics-2025-11-12-26967(can only be merged by SDK owner) (Azure#43956)
* code and test * update changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 1b97fed commit 4896496

File tree

193 files changed

+9698
-2670
lines changed

Some content is hidden

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

193 files changed

+9698
-2670
lines changed

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

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

3+
## 13.1.0 (2025-12-08)
4+
5+
### Features Added
6+
7+
- Added operation WorkspacesOperations.begin_failback
8+
- Added operation WorkspacesOperations.begin_failover
9+
- Added operation WorkspacesOperations.begin_reconcile_nsp
10+
- Added operation WorkspacesOperations.get_nsp
11+
- Added operation WorkspacesOperations.list_nsp
12+
- Added operation group SummaryLogsOperations
13+
- Model Cluster has a new parameter replication
14+
- Model LogAnalyticsQueryPack has a new parameter system_data
15+
- Model Workspace has a new parameter failover
16+
- Model Workspace has a new parameter replication
17+
- Model WorkspaceFeatures has a new parameter associations
18+
- Model WorkspaceFeatures has a new parameter unified_sentinel_billing_only
19+
- Model WorkspacePatch has a new parameter failover
20+
- Model WorkspacePatch has a new parameter replication
21+
322
## 13.0.0b7 (2024-11-05)
423

524
### Other Changes
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
include _meta.json
2-
recursive-include tests *.py *.json
3-
recursive-include samples *.py *.md
41
include *.md
5-
include azure/__init__.py
6-
include azure/mgmt/__init__.py
72
include LICENSE
83
include azure/mgmt/loganalytics/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py

sdk/loganalytics/azure-mgmt-loganalytics/_meta.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commit": "b40ebb26621eef12eb91a11a08793f507cdd367f",
3+
"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/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --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/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/readme.md"
11+
}

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

Lines changed: 315 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._log_analytics_management_client import LogAnalyticsManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._log_analytics_management_client import LogAnalyticsManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"LogAnalyticsManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
17+
from azure.core import AzureClouds
1818
from azure.core.credentials import TokenCredential
1919

2020

@@ -28,16 +28,32 @@ class LogAnalyticsManagementClientConfiguration: # pylint: disable=too-many-ins
2828
:type credential: ~azure.core.credentials.TokenCredential
2929
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32+
None.
33+
:type cloud_setting: ~azure.core.AzureClouds
34+
:keyword api_version: Api Version. Default value is "2025-07-01". Note that overriding this
35+
default value may result in unsupported behavior.
36+
:paramtype api_version: str
3137
"""
3238

33-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
39+
def __init__(
40+
self,
41+
credential: "TokenCredential",
42+
subscription_id: str,
43+
cloud_setting: Optional["AzureClouds"] = None,
44+
**kwargs: Any
45+
) -> None:
46+
api_version: str = kwargs.pop("api_version", "2025-07-01")
47+
3448
if credential is None:
3549
raise ValueError("Parameter 'credential' must not be None.")
3650
if subscription_id is None:
3751
raise ValueError("Parameter 'subscription_id' must not be None.")
3852

3953
self.credential = credential
4054
self.subscription_id = subscription_id
55+
self.cloud_setting = cloud_setting
56+
self.api_version = api_version
4157
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4258
kwargs.setdefault("sdk_moniker", "mgmt-loganalytics/{}".format(VERSION))
4359
self.polling_interval = kwargs.get("polling_interval", 30)

sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_log_analytics_management_client.py

Lines changed: 65 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
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 LogAnalyticsManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
AvailableServiceTiersOperations,
2325
ClustersOperations,
@@ -37,28 +39,32 @@
3739
SchemaOperations,
3840
SharedKeysOperations,
3941
StorageInsightConfigsOperations,
42+
SummaryLogsOperations,
4043
TablesOperations,
4144
UsagesOperations,
4245
WorkspacePurgeOperations,
4346
WorkspacesOperations,
4447
)
4548

4649
if TYPE_CHECKING:
47-
# pylint: disable=unused-import,ungrouped-imports
50+
from azure.core import AzureClouds
4851
from azure.core.credentials import TokenCredential
4952

5053

51-
class LogAnalyticsManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
54+
class LogAnalyticsManagementClient: # pylint: disable=too-many-instance-attributes
5255
"""Operational Insights Client.
5356
54-
:ivar query_packs: QueryPacksOperations operations
55-
:vartype query_packs: azure.mgmt.loganalytics.operations.QueryPacksOperations
56-
:ivar queries: QueriesOperations operations
57-
:vartype queries: azure.mgmt.loganalytics.operations.QueriesOperations
57+
:ivar available_service_tiers: AvailableServiceTiersOperations operations
58+
:vartype available_service_tiers:
59+
azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
60+
:ivar clusters: ClustersOperations operations
61+
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
5862
:ivar data_exports: DataExportsOperations operations
5963
:vartype data_exports: azure.mgmt.loganalytics.operations.DataExportsOperations
6064
:ivar data_sources: DataSourcesOperations operations
6165
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
66+
:ivar gateways: GatewaysOperations operations
67+
:vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
6268
:ivar intelligence_packs: IntelligencePacksOperations operations
6369
:vartype intelligence_packs: azure.mgmt.loganalytics.operations.IntelligencePacksOperations
6470
:ivar linked_services: LinkedServicesOperations operations
@@ -68,42 +74,47 @@ class LogAnalyticsManagementClient: # pylint: disable=client-accepts-api-versio
6874
azure.mgmt.loganalytics.operations.LinkedStorageAccountsOperations
6975
:ivar management_groups: ManagementGroupsOperations operations
7076
:vartype management_groups: azure.mgmt.loganalytics.operations.ManagementGroupsOperations
77+
:ivar operations: Operations operations
78+
:vartype operations: azure.mgmt.loganalytics.operations.Operations
7179
:ivar operation_statuses: OperationStatusesOperations operations
7280
:vartype operation_statuses: azure.mgmt.loganalytics.operations.OperationStatusesOperations
81+
:ivar queries: QueriesOperations operations
82+
:vartype queries: azure.mgmt.loganalytics.operations.QueriesOperations
83+
:ivar query_packs: QueryPacksOperations operations
84+
:vartype query_packs: azure.mgmt.loganalytics.operations.QueryPacksOperations
85+
:ivar saved_searches: SavedSearchesOperations operations
86+
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
87+
:ivar schema: SchemaOperations operations
88+
:vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
7389
:ivar shared_keys: SharedKeysOperations operations
7490
:vartype shared_keys: azure.mgmt.loganalytics.operations.SharedKeysOperations
75-
:ivar usages: UsagesOperations operations
76-
:vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
7791
:ivar storage_insight_configs: StorageInsightConfigsOperations operations
7892
:vartype storage_insight_configs:
7993
azure.mgmt.loganalytics.operations.StorageInsightConfigsOperations
80-
:ivar saved_searches: SavedSearchesOperations operations
81-
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
82-
:ivar available_service_tiers: AvailableServiceTiersOperations operations
83-
:vartype available_service_tiers:
84-
azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
85-
:ivar gateways: GatewaysOperations operations
86-
:vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
87-
:ivar schema: SchemaOperations operations
88-
:vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
94+
:ivar tables: TablesOperations operations
95+
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
96+
:ivar usages: UsagesOperations operations
97+
:vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
8998
:ivar workspace_purge: WorkspacePurgeOperations operations
9099
:vartype workspace_purge: azure.mgmt.loganalytics.operations.WorkspacePurgeOperations
91-
:ivar clusters: ClustersOperations operations
92-
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
93-
:ivar operations: Operations operations
94-
:vartype operations: azure.mgmt.loganalytics.operations.Operations
95100
:ivar workspaces: WorkspacesOperations operations
96101
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
97102
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
98103
:vartype deleted_workspaces: azure.mgmt.loganalytics.operations.DeletedWorkspacesOperations
99-
:ivar tables: TablesOperations operations
100-
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
104+
:ivar summary_logs: SummaryLogsOperations operations
105+
:vartype summary_logs: azure.mgmt.loganalytics.operations.SummaryLogsOperations
101106
:param credential: Credential needed for the client to connect to Azure. Required.
102107
:type credential: ~azure.core.credentials.TokenCredential
103108
:param subscription_id: The ID of the target subscription. Required.
104109
:type subscription_id: str
105-
:param base_url: Service URL. Default value is "https://management.azure.com".
110+
:param base_url: Service URL. Default value is None.
106111
:type base_url: str
112+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
113+
None.
114+
:paramtype cloud_setting: ~azure.core.AzureClouds
115+
:keyword api_version: Api Version. Default value is "2025-07-01". Note that overriding this
116+
default value may result in unsupported behavior.
117+
:paramtype api_version: str
107118
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
108119
Retry-After header is present.
109120
"""
@@ -112,12 +123,24 @@ def __init__(
112123
self,
113124
credential: "TokenCredential",
114125
subscription_id: str,
115-
base_url: str = "https://management.azure.com",
126+
base_url: Optional[str] = None,
127+
*,
128+
cloud_setting: Optional["AzureClouds"] = None,
116129
**kwargs: Any
117130
) -> None:
131+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
132+
_endpoints = get_arm_endpoints(_cloud)
133+
if not base_url:
134+
base_url = _endpoints["resource_manager"]
135+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
118136
self._config = LogAnalyticsManagementClientConfiguration(
119-
credential=credential, subscription_id=subscription_id, **kwargs
137+
credential=credential,
138+
subscription_id=subscription_id,
139+
cloud_setting=cloud_setting,
140+
credential_scopes=credential_scopes,
141+
**kwargs
120142
)
143+
121144
_policies = kwargs.pop("policies", None)
122145
if _policies is None:
123146
_policies = [
@@ -136,16 +159,19 @@ def __init__(
136159
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
137160
self._config.http_logging_policy,
138161
]
139-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
162+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
140163

141164
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
142165
self._serialize = Serializer(client_models)
143166
self._deserialize = Deserializer(client_models)
144167
self._serialize.client_side_validation = False
145-
self.query_packs = QueryPacksOperations(self._client, self._config, self._serialize, self._deserialize)
146-
self.queries = QueriesOperations(self._client, self._config, self._serialize, self._deserialize)
168+
self.available_service_tiers = AvailableServiceTiersOperations(
169+
self._client, self._config, self._serialize, self._deserialize
170+
)
171+
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
147172
self.data_exports = DataExportsOperations(self._client, self._config, self._serialize, self._deserialize)
148173
self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize)
174+
self.gateways = GatewaysOperations(self._client, self._config, self._serialize, self._deserialize)
149175
self.intelligence_packs = IntelligencePacksOperations(
150176
self._client, self._config, self._serialize, self._deserialize
151177
)
@@ -156,28 +182,26 @@ def __init__(
156182
self.management_groups = ManagementGroupsOperations(
157183
self._client, self._config, self._serialize, self._deserialize
158184
)
185+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
159186
self.operation_statuses = OperationStatusesOperations(
160187
self._client, self._config, self._serialize, self._deserialize
161188
)
189+
self.queries = QueriesOperations(self._client, self._config, self._serialize, self._deserialize)
190+
self.query_packs = QueryPacksOperations(self._client, self._config, self._serialize, self._deserialize)
191+
self.saved_searches = SavedSearchesOperations(self._client, self._config, self._serialize, self._deserialize)
192+
self.schema = SchemaOperations(self._client, self._config, self._serialize, self._deserialize)
162193
self.shared_keys = SharedKeysOperations(self._client, self._config, self._serialize, self._deserialize)
163-
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
164194
self.storage_insight_configs = StorageInsightConfigsOperations(
165195
self._client, self._config, self._serialize, self._deserialize
166196
)
167-
self.saved_searches = SavedSearchesOperations(self._client, self._config, self._serialize, self._deserialize)
168-
self.available_service_tiers = AvailableServiceTiersOperations(
169-
self._client, self._config, self._serialize, self._deserialize
170-
)
171-
self.gateways = GatewaysOperations(self._client, self._config, self._serialize, self._deserialize)
172-
self.schema = SchemaOperations(self._client, self._config, self._serialize, self._deserialize)
197+
self.tables = TablesOperations(self._client, self._config, self._serialize, self._deserialize)
198+
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
173199
self.workspace_purge = WorkspacePurgeOperations(self._client, self._config, self._serialize, self._deserialize)
174-
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
175-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
176200
self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize)
177201
self.deleted_workspaces = DeletedWorkspacesOperations(
178202
self._client, self._config, self._serialize, self._deserialize
179203
)
180-
self.tables = TablesOperations(self._client, self._config, self._serialize, self._deserialize)
204+
self.summary_logs = SummaryLogsOperations(self._client, self._config, self._serialize, self._deserialize)
181205

182206
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
183207
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)