Skip to content

Commit

Permalink
Release Python SDK for Log Analytics (#10729)
Browse files Browse the repository at this point in the history
* Generated from 9a8c892754eb974b84881730f4be732b9d32ac94

Minor Fix For Log Analysis Readme

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Zim Kalinowski <zikalino@microsoft.com>
  • Loading branch information
LianwMS and Zim Kalinowski authored Apr 11, 2020
1 parent 8f45538 commit dcee774
Show file tree
Hide file tree
Showing 100 changed files with 5,048 additions and 4,586 deletions.
60 changes: 60 additions & 0 deletions sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Release History

## 0.3.0 (2020-04-08)

**Features**

- Model OperationDisplay has a new parameter description
- Model LinkedService has a new parameter write_access_resource_id
- Model Workspace has a new parameter public_network_access_for_ingestion
- Model Workspace has a new parameter public_network_access_for_query
- Model Workspace has a new parameter private_link_scoped_resources
- Added operation group DataExportsOperations
- Added operation group LinkedStorageAccountsOperations
- Added operation group OperationalInsightsManagementClientOperationsMixin
- Added operation group ClustersOperations

**Breaking changes**

- Parameter location of model Workspace is now required
- Operation LinkedServicesOperations.create_or_update has a new signature
- Operation SavedSearchesOperations.delete has a new signature
- Operation SavedSearchesOperations.create_or_update has a new signature
- Operation SavedSearchesOperations.get has a new signature
- Operation LinkedServicesOperations.create_or_update has a new signature
- Model ProxyResource no longer has parameter tags
- Model SavedSearchesListResult no longer has parameter metadata
- Model Resource no longer has parameter location
- Model Resource no longer has parameter tags
- Model Workspace no longer has parameter source
- Model Workspace no longer has parameter portal_url
- Removed operation WorkspacesOperations.purge
- Removed operation WorkspacesOperations.get_search_results
- Removed operation WorkspacesOperations.list_link_targets
- Removed operation WorkspacesOperations.get_schema
- Removed operation WorkspacesOperations.update_search_results

**General Breaking Changes**

This version uses a next-generation code generator that *might*
introduce breaking changes. In summary, some modules were incorrectly
visible/importable and have been renamed. This fixed several issues
caused by usage of classes that were not supposed to be used in the
first place.

- LogAnalyticsManagementClient cannot be imported from
`azure.mgmt.loganalytics.log_analytics_management_client` anymore
(import OperationalInsightsManagementClient from
`azure.mgmt.loganalytics` works like before)
- LogAnalyticsManagementClientConfiguration import has been moved from
`azure.mgmt.loganalytics.log_analytics_management_client` to `azure.mgmt.loganalytics`
- A model `MyClass` from a "models" sub-module cannot be imported
anymore using `azure.mgmt.loganalytics.models.my_class` (import from
`azure.mgmt.loganalytics.models` works like before)
- An operation class `MyClassOperations` from an `operations`
sub-module cannot be imported anymore using
`azure.mgmt.loganalytics.operations.my_class_operations` (import from
`azure.mgmt.loganalytics.operations` works like before)

Last but not least, HTTP connection pooling is now enabled by default.
You should always use a client as a context manager, or call close(), or
use no more than one client per process.

## 0.2.0 (2018-05-29)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .log_analytics_management_client import LogAnalyticsManagementClient
from .version import VERSION
from ._configuration import OperationalInsightsManagementClientConfiguration
from ._operational_insights_management_client import OperationalInsightsManagementClient
__all__ = ['OperationalInsightsManagementClient', 'OperationalInsightsManagementClientConfiguration']

__all__ = ['LogAnalyticsManagementClient']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class OperationalInsightsManagementClientConfiguration(AzureConfiguration):
"""Configuration for OperationalInsightsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(OperationalInsightsManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -11,99 +11,80 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.storage_insights_operations import StorageInsightsOperations
from .operations.workspaces_operations import WorkspacesOperations
from .operations.saved_searches_operations import SavedSearchesOperations
from .operations.linked_services_operations import LinkedServicesOperations
from .operations.data_sources_operations import DataSourcesOperations
from .operations.operations import Operations
from . import models


class LogAnalyticsManagementClientConfiguration(AzureConfiguration):
"""Configuration for LogAnalyticsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Gets subscription credentials which uniquely
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import OperationalInsightsManagementClientConfiguration
from .operations import OperationalInsightsManagementClientOperationsMixin
from .operations import DataExportsOperations
from .operations import DataSourcesOperations
from .operations import WorkspacesOperations
from .operations import LinkedServicesOperations
from .operations import LinkedStorageAccountsOperations
from .operations import Operations
from .operations import ClustersOperations
from .operations import StorageInsightsOperations
from .operations import SavedSearchesOperations
from . import models


class LogAnalyticsManagementClient(SDKClient):
"""The Log Analytics Client.
class OperationalInsightsManagementClient(OperationalInsightsManagementClientOperationsMixin, SDKClient):
"""Operational Insights Client
:ivar config: Configuration for client.
:vartype config: LogAnalyticsManagementClientConfiguration
:vartype config: OperationalInsightsManagementClientConfiguration
:ivar storage_insights: StorageInsights operations
:vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations
:ivar data_exports: DataExports operations
:vartype data_exports: azure.mgmt.loganalytics.operations.DataExportsOperations
:ivar data_sources: DataSources operations
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar saved_searches: SavedSearches operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:ivar linked_services: LinkedServices operations
:vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations
:ivar data_sources: DataSources operations
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
:ivar linked_storage_accounts: LinkedStorageAccounts operations
:vartype linked_storage_accounts: azure.mgmt.loganalytics.operations.LinkedStorageAccountsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
:ivar storage_insights: StorageInsights operations
:vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations
:ivar saved_searches: SavedSearches operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Gets subscription credentials which uniquely
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = LogAnalyticsManagementClientConfiguration(credentials, subscription_id, base_url)
super(LogAnalyticsManagementClient, self).__init__(self.config.credentials, self.config)
self.config = OperationalInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
super(OperationalInsightsManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-03-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.storage_insights = StorageInsightsOperations(
self.data_exports = DataExportsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self.data_sources = DataSourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.saved_searches = SavedSearchesOperations(
self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.linked_services = LinkedServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.data_sources = DataSourcesOperations(
self.linked_storage_accounts = LinkedStorageAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_insights = StorageInsightsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.saved_searches = SavedSearchesOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading

0 comments on commit dcee774

Please sign in to comment.