77# --------------------------------------------------------------------------
88
99from copy import deepcopy
10- from typing import Any , TYPE_CHECKING
10+ from typing import Any , Optional , TYPE_CHECKING , cast
1111from typing_extensions import Self
1212
1313from azure .core .pipeline import policies
1414from azure .core .rest import HttpRequest , HttpResponse
15+ from azure .core .settings import settings
1516from azure .mgmt .core import ARMPipelineClient
1617from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
18+ from azure .mgmt .core .tools import get_arm_endpoints
1719
1820from . import models as _models
1921from ._configuration import LogAnalyticsManagementClientConfiguration
20- from ._serialization import Deserializer , Serializer
22+ from ._utils . serialization import Deserializer , Serializer
2123from .operations import (
2224 AvailableServiceTiersOperations ,
2325 ClustersOperations ,
3739 SchemaOperations ,
3840 SharedKeysOperations ,
3941 StorageInsightConfigsOperations ,
42+ SummaryLogsOperations ,
4043 TablesOperations ,
4144 UsagesOperations ,
4245 WorkspacePurgeOperations ,
4346 WorkspacesOperations ,
4447)
4548
4649if 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