Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 0.0.0 (2025-12-21)

change log generation failed!!! You need to write it manually!!!

## 13.0.0b7 (2024-11-05)

### Other Changes
Expand Down
9 changes: 4 additions & 5 deletions sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include _meta.json
recursive-include tests *.py *.json
recursive-include samples *.py *.md
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include LICENSE
include azure/mgmt/loganalytics/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/mgmt/__init__.py
11 changes: 0 additions & 11 deletions sdk/loganalytics/azure-mgmt-loganalytics/_meta.json

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commit": "788c11df9da57f04d4f9e3a72c05fea0e0bd4c6e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.42.0",
"@autorest/modelerfour@4.27.0"
],
"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/python@6.42.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/OperationalInsights/readme.md"
}
315 changes: 315 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/apiview-properties.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._log_analytics_management_client import LogAnalyticsManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._log_analytics_management_client import LogAnalyticsManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"LogAnalyticsManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

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


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

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2025-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.cloud_setting = cloud_setting
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-loganalytics/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
from azure.core.settings import settings
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.mgmt.core.tools import get_arm_endpoints

from . import models as _models
from ._configuration import LogAnalyticsManagementClientConfiguration
from ._serialization import Deserializer, Serializer
from ._utils.serialization import Deserializer, Serializer
from .operations import (
AvailableServiceTiersOperations,
ClustersOperations,
Expand All @@ -37,28 +39,32 @@
SchemaOperations,
SharedKeysOperations,
StorageInsightConfigsOperations,
SummaryLogsOperations,
TablesOperations,
UsagesOperations,
WorkspacePurgeOperations,
WorkspacesOperations,
)

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


class LogAnalyticsManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class LogAnalyticsManagementClient: # pylint: disable=too-many-instance-attributes
"""Operational Insights Client.

:ivar query_packs: QueryPacksOperations operations
:vartype query_packs: azure.mgmt.loganalytics.operations.QueryPacksOperations
:ivar queries: QueriesOperations operations
:vartype queries: azure.mgmt.loganalytics.operations.QueriesOperations
:ivar available_service_tiers: AvailableServiceTiersOperations operations
:vartype available_service_tiers:
azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
:ivar data_exports: DataExportsOperations operations
:vartype data_exports: azure.mgmt.loganalytics.operations.DataExportsOperations
:ivar data_sources: DataSourcesOperations operations
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
:ivar gateways: GatewaysOperations operations
:vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
:ivar intelligence_packs: IntelligencePacksOperations operations
:vartype intelligence_packs: azure.mgmt.loganalytics.operations.IntelligencePacksOperations
:ivar linked_services: LinkedServicesOperations operations
Expand All @@ -68,42 +74,47 @@ class LogAnalyticsManagementClient: # pylint: disable=client-accepts-api-versio
azure.mgmt.loganalytics.operations.LinkedStorageAccountsOperations
:ivar management_groups: ManagementGroupsOperations operations
:vartype management_groups: azure.mgmt.loganalytics.operations.ManagementGroupsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations
:ivar operation_statuses: OperationStatusesOperations operations
:vartype operation_statuses: azure.mgmt.loganalytics.operations.OperationStatusesOperations
:ivar queries: QueriesOperations operations
:vartype queries: azure.mgmt.loganalytics.operations.QueriesOperations
:ivar query_packs: QueryPacksOperations operations
:vartype query_packs: azure.mgmt.loganalytics.operations.QueryPacksOperations
:ivar saved_searches: SavedSearchesOperations operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:ivar schema: SchemaOperations operations
:vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
:ivar shared_keys: SharedKeysOperations operations
:vartype shared_keys: azure.mgmt.loganalytics.operations.SharedKeysOperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
:ivar storage_insight_configs: StorageInsightConfigsOperations operations
:vartype storage_insight_configs:
azure.mgmt.loganalytics.operations.StorageInsightConfigsOperations
:ivar saved_searches: SavedSearchesOperations operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:ivar available_service_tiers: AvailableServiceTiersOperations operations
:vartype available_service_tiers:
azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
:ivar gateways: GatewaysOperations operations
:vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
:ivar schema: SchemaOperations operations
:vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
:ivar workspace_purge: WorkspacePurgeOperations operations
:vartype workspace_purge: azure.mgmt.loganalytics.operations.WorkspacePurgeOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations
:ivar workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar deleted_workspaces: DeletedWorkspacesOperations operations
:vartype deleted_workspaces: azure.mgmt.loganalytics.operations.DeletedWorkspacesOperations
:ivar tables: TablesOperations operations
:vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
:ivar summary_logs: SummaryLogsOperations operations
:vartype summary_logs: azure.mgmt.loganalytics.operations.SummaryLogsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:param base_url: Service URL. Default value is None.
:type base_url: str
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2025-07-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand All @@ -112,12 +123,24 @@ def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
base_url: str = "https://management.azure.com",
base_url: Optional[str] = None,
*,
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = LogAnalyticsManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
credential=credential,
subscription_id=subscription_id,
cloud_setting=cloud_setting,
credential_scopes=credential_scopes,
**kwargs
)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand All @@ -136,16 +159,19 @@ def __init__(
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.query_packs = QueryPacksOperations(self._client, self._config, self._serialize, self._deserialize)
self.queries = QueriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.available_service_tiers = AvailableServiceTiersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_exports = DataExportsOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.gateways = GatewaysOperations(self._client, self._config, self._serialize, self._deserialize)
self.intelligence_packs = IntelligencePacksOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -156,28 +182,26 @@ def __init__(
self.management_groups = ManagementGroupsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.operation_statuses = OperationStatusesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.queries = QueriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.query_packs = QueryPacksOperations(self._client, self._config, self._serialize, self._deserialize)
self.saved_searches = SavedSearchesOperations(self._client, self._config, self._serialize, self._deserialize)
self.schema = SchemaOperations(self._client, self._config, self._serialize, self._deserialize)
self.shared_keys = SharedKeysOperations(self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.storage_insight_configs = StorageInsightConfigsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.saved_searches = SavedSearchesOperations(self._client, self._config, self._serialize, self._deserialize)
self.available_service_tiers = AvailableServiceTiersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateways = GatewaysOperations(self._client, self._config, self._serialize, self._deserialize)
self.schema = SchemaOperations(self._client, self._config, self._serialize, self._deserialize)
self.tables = TablesOperations(self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.workspace_purge = WorkspacePurgeOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize)
self.deleted_workspaces = DeletedWorkspacesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.tables = TablesOperations(self._client, self._config, self._serialize, self._deserialize)
self.summary_logs = SummaryLogsOperations(self._client, self._config, self._serialize, self._deserialize)

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