diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md index 1c857780a9a4..2ae94e63b274 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md @@ -1,5 +1,64 @@ # 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** diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py index 9a73494da9ba..28fa03f15cf7 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py @@ -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 diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py new file mode 100644 index 000000000000..894d9329a60a --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py @@ -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` + :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 diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py similarity index 53% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py index 25d5d8a10b9a..eac309bd9033 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py @@ -11,76 +11,50 @@ 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` - :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` - :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 """ @@ -88,22 +62,29 @@ class LogAnalyticsManagementClient(SDKClient): 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) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py index 10363263f00d..d441d7803976 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py @@ -10,140 +10,155 @@ # -------------------------------------------------------------------------- try: - from .link_target_py3 import LinkTarget - from .tag_py3 import Tag - from .core_summary_py3 import CoreSummary - from .search_sort_py3 import SearchSort - from .search_metadata_schema_py3 import SearchMetadataSchema - from .search_metadata_py3 import SearchMetadata - from .saved_search_py3 import SavedSearch - from .saved_searches_list_result_py3 import SavedSearchesListResult - from .search_error_py3 import SearchError - from .search_results_response_py3 import SearchResultsResponse - from .search_schema_value_py3 import SearchSchemaValue - from .search_get_schema_response_py3 import SearchGetSchemaResponse - from .search_highlight_py3 import SearchHighlight - from .search_parameters_py3 import SearchParameters - from .storage_account_py3 import StorageAccount - from .storage_insight_status_py3 import StorageInsightStatus - from .storage_insight_py3 import StorageInsight - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .workspace_purge_body_filters_py3 import WorkspacePurgeBodyFilters - from .workspace_purge_body_py3 import WorkspacePurgeBody - from .workspace_purge_response_py3 import WorkspacePurgeResponse - from .workspace_purge_status_response_py3 import WorkspacePurgeStatusResponse - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .linked_service_py3 import LinkedService - from .data_source_py3 import DataSource - from .data_source_filter_py3 import DataSourceFilter - from .intelligence_pack_py3 import IntelligencePack - from .shared_keys_py3 import SharedKeys - from .metric_name_py3 import MetricName - from .usage_metric_py3 import UsageMetric - from .management_group_py3 import ManagementGroup - from .sku_py3 import Sku - from .workspace_py3 import Workspace + from ._models_py3 import AzureEntityResource + from ._models_py3 import Cluster + from ._models_py3 import ClusterErrorResponse, ClusterErrorResponseException + from ._models_py3 import ClusterPatch + from ._models_py3 import ClusterSku + from ._models_py3 import DataExport + from ._models_py3 import DataExportErrorResponse, DataExportErrorResponseException + from ._models_py3 import DataSource + from ._models_py3 import DataSourceFilter + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorResponse + from ._models_py3 import Identity + from ._models_py3 import IntelligencePack + from ._models_py3 import KeyVaultProperties + from ._models_py3 import LinkedService + from ._models_py3 import LinkedStorageAccountsResource + from ._models_py3 import ManagementGroup + from ._models_py3 import MetricName + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationStatus + from ._models_py3 import PrivateLinkScopedResource + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import SavedSearch + from ._models_py3 import SavedSearchesListResult + from ._models_py3 import SharedKeys + from ._models_py3 import StorageAccount + from ._models_py3 import StorageInsight + from ._models_py3 import StorageInsightStatus + from ._models_py3 import Tag + from ._models_py3 import TrackedResource + from ._models_py3 import UsageMetric + from ._models_py3 import Workspace + from ._models_py3 import WorkspacePatch + from ._models_py3 import WorkspaceSku except (SyntaxError, ImportError): - from .link_target import LinkTarget - from .tag import Tag - from .core_summary import CoreSummary - from .search_sort import SearchSort - from .search_metadata_schema import SearchMetadataSchema - from .search_metadata import SearchMetadata - from .saved_search import SavedSearch - from .saved_searches_list_result import SavedSearchesListResult - from .search_error import SearchError - from .search_results_response import SearchResultsResponse - from .search_schema_value import SearchSchemaValue - from .search_get_schema_response import SearchGetSchemaResponse - from .search_highlight import SearchHighlight - from .search_parameters import SearchParameters - from .storage_account import StorageAccount - from .storage_insight_status import StorageInsightStatus - from .storage_insight import StorageInsight - from .resource import Resource - from .proxy_resource import ProxyResource - from .workspace_purge_body_filters import WorkspacePurgeBodyFilters - from .workspace_purge_body import WorkspacePurgeBody - from .workspace_purge_response import WorkspacePurgeResponse - from .workspace_purge_status_response import WorkspacePurgeStatusResponse - from .operation_display import OperationDisplay - from .operation import Operation - from .linked_service import LinkedService - from .data_source import DataSource - from .data_source_filter import DataSourceFilter - from .intelligence_pack import IntelligencePack - from .shared_keys import SharedKeys - from .metric_name import MetricName - from .usage_metric import UsageMetric - from .management_group import ManagementGroup - from .sku import Sku - from .workspace import Workspace -from .storage_insight_paged import StorageInsightPaged -from .usage_metric_paged import UsageMetricPaged -from .management_group_paged import ManagementGroupPaged -from .workspace_paged import WorkspacePaged -from .linked_service_paged import LinkedServicePaged -from .data_source_paged import DataSourcePaged -from .operation_paged import OperationPaged -from .log_analytics_management_client_enums import ( - SearchSortEnum, - StorageInsightState, - PurgeState, + from ._models import AzureEntityResource + from ._models import Cluster + from ._models import ClusterErrorResponse, ClusterErrorResponseException + from ._models import ClusterPatch + from ._models import ClusterSku + from ._models import DataExport + from ._models import DataExportErrorResponse, DataExportErrorResponseException + from ._models import DataSource + from ._models import DataSourceFilter + from ._models import ErrorAdditionalInfo + from ._models import ErrorResponse + from ._models import Identity + from ._models import IntelligencePack + from ._models import KeyVaultProperties + from ._models import LinkedService + from ._models import LinkedStorageAccountsResource + from ._models import ManagementGroup + from ._models import MetricName + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationStatus + from ._models import PrivateLinkScopedResource + from ._models import ProxyResource + from ._models import Resource + from ._models import SavedSearch + from ._models import SavedSearchesListResult + from ._models import SharedKeys + from ._models import StorageAccount + from ._models import StorageInsight + from ._models import StorageInsightStatus + from ._models import Tag + from ._models import TrackedResource + from ._models import UsageMetric + from ._models import Workspace + from ._models import WorkspacePatch + from ._models import WorkspaceSku +from ._paged_models import ClusterPaged +from ._paged_models import DataExportPaged +from ._paged_models import DataSourcePaged +from ._paged_models import LinkedServicePaged +from ._paged_models import LinkedStorageAccountsResourcePaged +from ._paged_models import ManagementGroupPaged +from ._paged_models import OperationPaged +from ._paged_models import StorageInsightPaged +from ._paged_models import UsageMetricPaged +from ._paged_models import WorkspacePaged +from ._operational_insights_management_client_enums import ( + Type, DataSourceKind, - SkuNameEnum, + DataSourceType, + WorkspaceSkuNameEnum, EntityStatus, + PublicNetworkAccessType, + ClusterSkuNameEnum, + IdentityType, + StorageInsightState, ) __all__ = [ - 'LinkTarget', - 'Tag', - 'CoreSummary', - 'SearchSort', - 'SearchMetadataSchema', - 'SearchMetadata', - 'SavedSearch', - 'SavedSearchesListResult', - 'SearchError', - 'SearchResultsResponse', - 'SearchSchemaValue', - 'SearchGetSchemaResponse', - 'SearchHighlight', - 'SearchParameters', - 'StorageAccount', - 'StorageInsightStatus', - 'StorageInsight', - 'Resource', - 'ProxyResource', - 'WorkspacePurgeBodyFilters', - 'WorkspacePurgeBody', - 'WorkspacePurgeResponse', - 'WorkspacePurgeStatusResponse', - 'OperationDisplay', - 'Operation', - 'LinkedService', + 'AzureEntityResource', + 'Cluster', + 'ClusterErrorResponse', 'ClusterErrorResponseException', + 'ClusterPatch', + 'ClusterSku', + 'DataExport', + 'DataExportErrorResponse', 'DataExportErrorResponseException', 'DataSource', 'DataSourceFilter', + 'ErrorAdditionalInfo', + 'ErrorResponse', + 'Identity', 'IntelligencePack', - 'SharedKeys', + 'KeyVaultProperties', + 'LinkedService', + 'LinkedStorageAccountsResource', + 'ManagementGroup', 'MetricName', + 'Operation', + 'OperationDisplay', + 'OperationStatus', + 'PrivateLinkScopedResource', + 'ProxyResource', + 'Resource', + 'SavedSearch', + 'SavedSearchesListResult', + 'SharedKeys', + 'StorageAccount', + 'StorageInsight', + 'StorageInsightStatus', + 'Tag', + 'TrackedResource', 'UsageMetric', - 'ManagementGroup', - 'Sku', 'Workspace', - 'StorageInsightPaged', - 'UsageMetricPaged', + 'WorkspacePatch', + 'WorkspaceSku', + 'DataExportPaged', + 'DataSourcePaged', 'ManagementGroupPaged', + 'UsageMetricPaged', 'WorkspacePaged', 'LinkedServicePaged', - 'DataSourcePaged', + 'LinkedStorageAccountsResourcePaged', 'OperationPaged', - 'SearchSortEnum', - 'StorageInsightState', - 'PurgeState', + 'ClusterPaged', + 'StorageInsightPaged', + 'Type', 'DataSourceKind', - 'SkuNameEnum', + 'DataSourceType', + 'WorkspaceSkuNameEnum', 'EntityStatus', + 'PublicNetworkAccessType', + 'ClusterSkuNameEnum', + 'IdentityType', + 'StorageInsightState', ] diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py new file mode 100644 index 000000000000..dec384ebc1f5 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py @@ -0,0 +1,1428 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class Cluster(TrackedResource): + """The top level Log Analytics cluster resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.loganalytics.models.Identity + :param sku: The sku properties. + :type sku: ~azure.mgmt.loganalytics.models.ClusterSku + :param next_link: The link used to get the next page of recommendations. + :type next_link: str + :ivar cluster_id: The ID associated with the cluster. + :vartype cluster_id: str + :ivar provisioning_state: The provisioning state of the cluster. Possible + values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + 'ProvisioningAccount' + :vartype provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :param key_vault_properties: The associated key properties. + :type key_vault_properties: + ~azure.mgmt.loganalytics.models.KeyVaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'cluster_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(Cluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.next_link = kwargs.get('next_link', None) + self.cluster_id = None + self.provisioning_state = None + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +class ClusterErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(ClusterErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ClusterErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ClusterErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ClusterErrorResponseException, self).__init__(deserialize, response, 'ClusterErrorResponse', *args) + + +class ClusterPatch(Model): + """The top level Log Analytics cluster resource container. + + :param key_vault_properties: The associated key properties. + :type key_vault_properties: + ~azure.mgmt.loganalytics.models.KeyVaultProperties + :param sku: The sku properties. + :type sku: ~azure.mgmt.loganalytics.models.ClusterSku + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ClusterPatch, self).__init__(**kwargs) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class ClusterSku(Model): + """The cluster sku definition. + + :param capacity: The capacity value + :type capacity: long + :param name: The name of the SKU. Possible values include: + 'CapacityReservation' + :type name: str or ~azure.mgmt.loganalytics.models.ClusterSkuNameEnum + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterSku, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.name = kwargs.get('name', None) + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class DataExport(ProxyResource): + """The top level data export resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param data_export_id: The data export rule ID. + :type data_export_id: str + :param all_tables: When ‘true’, all workspace's tables are exported. + :type all_tables: bool + :param table_names: An array of tables to export, for example: + [“Heartbeat, SecurityEvent”]. + :type table_names: list[str] + :param resource_id: Required. The destination resource ID. This can be + copied from the Properties entry of the destination resource in Azure. + :type resource_id: str + :ivar data_export_type: The type of the destination resource. Possible + values include: 'StorageAccount', 'EventHub' + :vartype data_export_type: str or ~azure.mgmt.loganalytics.models.Type + :param event_hub_name: Optional. Allows to define an Event Hub name. Not + applicable when destination is Storage Account. + :type event_hub_name: str + :param enable: Active when enabled. + :type enable: bool + :param created_date: The latest data export rule modification time. + :type created_date: str + :param last_modified_date: Date and time when the export was last + modified. + :type last_modified_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_id': {'required': True}, + 'data_export_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_export_id': {'key': 'properties.dataExportId', 'type': 'str'}, + 'all_tables': {'key': 'properties.allTables', 'type': 'bool'}, + 'table_names': {'key': 'properties.tableNames', 'type': '[str]'}, + 'resource_id': {'key': 'properties.destination.resourceId', 'type': 'str'}, + 'data_export_type': {'key': 'properties.destination.type', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.destination.metaData.eventHubName', 'type': 'str'}, + 'enable': {'key': 'properties.enable', 'type': 'bool'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'last_modified_date': {'key': 'properties.lastModifiedDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataExport, self).__init__(**kwargs) + self.data_export_id = kwargs.get('data_export_id', None) + self.all_tables = kwargs.get('all_tables', None) + self.table_names = kwargs.get('table_names', None) + self.resource_id = kwargs.get('resource_id', None) + self.data_export_type = None + self.event_hub_name = kwargs.get('event_hub_name', None) + self.enable = kwargs.get('enable', None) + self.created_date = kwargs.get('created_date', None) + self.last_modified_date = kwargs.get('last_modified_date', None) + + +class DataExportErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(DataExportErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class DataExportErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DataExportErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DataExportErrorResponseException, self).__init__(deserialize, response, 'DataExportErrorResponse', *args) + + +class DataSource(ProxyResource): + """Datasources under OMS Workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. + :type properties: object + :param e_tag: The ETag of the data source. + :type e_tag: str + :param kind: Required. Possible values include: 'WindowsEvent', + 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + 'LinuxSyslogCollection', 'LinuxPerformanceObject', + 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', + 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + 'SecurityWindowsBaselineConfiguration', + 'SecurityCenterSecurityWindowsBaselineConfiguration', + 'SecurityEventCollectionConfiguration', + 'SecurityInsightsSecurityEventCollectionConfiguration', + 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + 'ApplicationInsights', 'SqlDataClassification' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DataSource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.e_tag = kwargs.get('e_tag', None) + self.kind = kwargs.get('kind', None) + self.tags = kwargs.get('tags', None) + + +class DataSourceFilter(Model): + """DataSource filter. Right now, only filter by kind is supported. + + :param kind: Possible values include: 'WindowsEvent', + 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + 'LinuxSyslogCollection', 'LinuxPerformanceObject', + 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', + 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + 'SecurityWindowsBaselineConfiguration', + 'SecurityCenterSecurityWindowsBaselineConfiguration', + 'SecurityEventCollectionConfiguration', + 'SecurityInsightsSecurityEventCollectionConfiguration', + 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + 'ApplicationInsights', 'SqlDataClassification' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.loganalytics.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.loganalytics.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: + 'SystemAssigned', 'None' + :type type: str or ~azure.mgmt.loganalytics.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class IntelligencePack(Model): + """Intelligence Pack containing a string name and boolean indicating if it's + enabled. + + :param name: The name of the intelligence pack. + :type name: str + :param enabled: The enabled boolean for the intelligence pack. + :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntelligencePack, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + self.display_name = kwargs.get('display_name', None) + + +class KeyVaultProperties(Model): + """The key vault properties. + + :param key_vault_uri: The Key Vault uri which holds they key associated + with the Log Analytics cluster. + :type key_vault_uri: str + :param key_name: The name of the key associated with the Log Analytics + cluster. + :type key_name: str + :param key_version: The version of the key associated with the Log + Analytics cluster. + :type key_version: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + +class LinkedService(ProxyResource): + """The top level Linked service resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param resource_id: The resource id of the resource that will be linked to + the workspace. This should be used for linking resources which require + read access + :type resource_id: str + :param write_access_resource_id: The resource id of the resource that will + be linked to the workspace. This should be used for linking resources + which require write access + :type write_access_resource_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'write_access_resource_id': {'key': 'properties.writeAccessResourceId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LinkedService, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.write_access_resource_id = kwargs.get('write_access_resource_id', None) + self.tags = kwargs.get('tags', None) + + +class LinkedStorageAccountsResource(ProxyResource): + """Linked storage accounts top level resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar data_source_type: Linked storage accounts type. Possible values + include: 'CustomLogs', 'AzureWatson' + :vartype data_source_type: str or + ~azure.mgmt.loganalytics.models.DataSourceType + :param storage_account_ids: Linked storage accounts resources ids. + :type storage_account_ids: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_source_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_source_type': {'key': 'properties.dataSourceType', 'type': 'DataSourceType'}, + 'storage_account_ids': {'key': 'properties.storageAccountIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LinkedStorageAccountsResource, self).__init__(**kwargs) + self.data_source_type = None + self.storage_account_ids = kwargs.get('storage_account_ids', None) + + +class ManagementGroup(Model): + """A management group that is connected to a workspace. + + :param server_count: The number of servers connected to the management + group. + :type server_count: int + :param is_gateway: Gets or sets a value indicating whether the management + group is a gateway. + :type is_gateway: bool + :param name: The name of the management group. + :type name: str + :param id: The unique ID of the management group. + :type id: str + :param created: The datetime that the management group was created. + :type created: datetime + :param data_received: The last datetime that the management group received + data. + :type data_received: datetime + :param version: The version of System Center that is managing the + management group. + :type version: str + :param sku: The SKU of System Center that is managing the management + group. + :type sku: str + """ + + _attribute_map = { + 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, + 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'id': {'key': 'properties.id', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = kwargs.get('server_count', None) + self.is_gateway = kwargs.get('is_gateway', None) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.created = kwargs.get('created', None) + self.data_received = kwargs.get('data_received', None) + self.version = kwargs.get('version', None) + self.sku = kwargs.get('sku', None) + + +class MetricName(Model): + """The name of a metric. + + :param value: The system name of the metric. + :type value: str + :param localized_value: The localized name of the metric. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationStatus(Model): + """The status of operation. + + :param id: The operation Id. + :type id: str + :param name: The operation name. + :type name: str + :param start_time: The start time of the operation. + :type start_time: str + :param end_time: The end time of the operation. + :type end_time: str + :param status: The status of the operation. + :type status: str + :param error: The error detail of the operation if any. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) + + +class PrivateLinkScopedResource(Model): + """The private link scope resource reference. + + :param resource_id: The full resource Id of the private link scope + resource. + :type resource_id: str + :param scope_id: The private link scope unique Identifier. + :type scope_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'scope_id': {'key': 'scopeId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkScopedResource, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.scope_id = kwargs.get('scope_id', None) + + +class SavedSearch(ProxyResource): + """Value object for saved search results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param e_tag: The ETag of the saved search. + :type e_tag: str + :param category: Required. The category of the saved search. This helps + the user to find a saved search faster. + :type category: str + :param display_name: Required. Saved search display name. + :type display_name: str + :param query: Required. The query expression for the saved search. Please + see + https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference + for reference. + :type query: str + :param version: The version number of the query language. The current + version is 2 and is the default. + :type version: long + :param tags: The tags attached to the saved search. + :type tags: list[~azure.mgmt.loganalytics.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'display_name': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'long'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, **kwargs): + super(SavedSearch, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.category = kwargs.get('category', None) + self.display_name = kwargs.get('display_name', None) + self.query = kwargs.get('query', None) + self.version = kwargs.get('version', None) + self.tags = kwargs.get('tags', None) + + +class SavedSearchesListResult(Model): + """The saved search list operation response. + + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SavedSearch]'}, + } + + def __init__(self, **kwargs): + super(SavedSearchesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SharedKeys(Model): + """The shared keys for a workspace. + + :param primary_shared_key: The primary shared key of a workspace. + :type primary_shared_key: str + :param secondary_shared_key: The secondary shared key of a workspace. + :type secondary_shared_key: str + """ + + _attribute_map = { + 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, + 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = kwargs.get('primary_shared_key', None) + self.secondary_shared_key = kwargs.get('secondary_shared_key', None) + + +class StorageAccount(Model): + """Describes a storage account connection. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Azure Resource Manager ID of the storage account + resource. + :type id: str + :param key: Required. The storage account key. + :type key: str + """ + + _validation = { + 'id': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.key = kwargs.get('key', None) + + +class StorageInsight(ProxyResource): + """The top level storage insight resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param containers: The names of the blob containers that the workspace + should read + :type containers: list[str] + :param tables: The names of the Azure tables that the workspace should + read + :type tables: list[str] + :param storage_account: Required. The storage account connection details + :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount + :ivar status: The status of the storage insight + :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus + :param e_tag: The ETag of the storage insight. + :type e_tag: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '[str]'}, + 'tables': {'key': 'properties.tables', 'type': '[str]'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, + 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(StorageInsight, self).__init__(**kwargs) + self.containers = kwargs.get('containers', None) + self.tables = kwargs.get('tables', None) + self.storage_account = kwargs.get('storage_account', None) + self.status = None + self.e_tag = kwargs.get('e_tag', None) + self.tags = kwargs.get('tags', None) + + +class StorageInsightStatus(Model): + """The status of the storage insight. + + All required parameters must be populated in order to send to Azure. + + :param state: Required. The state of the storage insight connection to the + workspace. Possible values include: 'OK', 'ERROR' + :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState + :param description: Description of the state of the storage insight. + :type description: str + """ + + _validation = { + 'state': {'required': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageInsightStatus, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.description = kwargs.get('description', None) + + +class Tag(Model): + """A tag of a saved search. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The tag name. + :type name: str + :param value: Required. The tag value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Tag, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class UsageMetric(Model): + """A metric describing the usage of a resource. + + :param name: The name of the metric. + :type name: ~azure.mgmt.loganalytics.models.MetricName + :param unit: The units used for the metric. + :type unit: str + :param current_value: The current value of the metric. + :type current_value: float + :param limit: The quota limit for the metric. + :type limit: float + :param next_reset_time: The time that the metric's value will reset. + :type next_reset_time: datetime + :param quota_period: The quota period that determines the length of time + between value resets. + :type quota_period: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageMetric, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.quota_period = kwargs.get('quota_period', None) + + +class Workspace(TrackedResource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param public_network_access_for_ingestion: The network access type for + accessing Log Analytics ingestion. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_ingestion: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param public_network_access_for_query: The network access type for + accessing Log Analytics query. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_query: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :ivar private_link_scoped_resources: List of linked private link scope + resources. + :vartype private_link_scoped_resources: + list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param e_tag: The ETag of the workspace. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'customer_id': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + 'private_link_scoped_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, + 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.customer_id = None + self.sku = kwargs.get('sku', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") + self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.private_link_scoped_resources = None + self.e_tag = kwargs.get('e_tag', None) + + +class WorkspacePatch(AzureEntityResource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param public_network_access_for_ingestion: The network access type for + accessing Log Analytics ingestion. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_ingestion: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param public_network_access_for_query: The network access type for + accessing Log Analytics query. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_query: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :ivar private_link_scoped_resources: List of linked private link scope + resources. + :vartype private_link_scoped_resources: + list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param tags: Resource tags. Optional. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + 'private_link_scoped_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, + 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(WorkspacePatch, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.customer_id = None + self.sku = kwargs.get('sku', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") + self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.private_link_scoped_resources = None + self.tags = kwargs.get('tags', None) + + +class WorkspaceSku(Model): + """The SKU (tier) of a workspace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + 'CapacityReservation' + :type name: str or ~azure.mgmt.loganalytics.models.WorkspaceSkuNameEnum + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py new file mode 100644 index 000000000000..2ebee3fa3e3f --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py @@ -0,0 +1,1428 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Cluster(TrackedResource): + """The top level Log Analytics cluster resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.loganalytics.models.Identity + :param sku: The sku properties. + :type sku: ~azure.mgmt.loganalytics.models.ClusterSku + :param next_link: The link used to get the next page of recommendations. + :type next_link: str + :ivar cluster_id: The ID associated with the cluster. + :vartype cluster_id: str + :ivar provisioning_state: The provisioning state of the cluster. Possible + values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + 'ProvisioningAccount' + :vartype provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :param key_vault_properties: The associated key properties. + :type key_vault_properties: + ~azure.mgmt.loganalytics.models.KeyVaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'cluster_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, next_link: str=None, key_vault_properties=None, **kwargs) -> None: + super(Cluster, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.sku = sku + self.next_link = next_link + self.cluster_id = None + self.provisioning_state = None + self.key_vault_properties = key_vault_properties + + +class ClusterErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ClusterErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ClusterErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ClusterErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ClusterErrorResponseException, self).__init__(deserialize, response, 'ClusterErrorResponse', *args) + + +class ClusterPatch(Model): + """The top level Log Analytics cluster resource container. + + :param key_vault_properties: The associated key properties. + :type key_vault_properties: + ~azure.mgmt.loganalytics.models.KeyVaultProperties + :param sku: The sku properties. + :type sku: ~azure.mgmt.loganalytics.models.ClusterSku + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, key_vault_properties=None, sku=None, tags=None, **kwargs) -> None: + super(ClusterPatch, self).__init__(**kwargs) + self.key_vault_properties = key_vault_properties + self.sku = sku + self.tags = tags + + +class ClusterSku(Model): + """The cluster sku definition. + + :param capacity: The capacity value + :type capacity: long + :param name: The name of the SKU. Possible values include: + 'CapacityReservation' + :type name: str or ~azure.mgmt.loganalytics.models.ClusterSkuNameEnum + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, capacity: int=None, name=None, **kwargs) -> None: + super(ClusterSku, self).__init__(**kwargs) + self.capacity = capacity + self.name = name + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class DataExport(ProxyResource): + """The top level data export resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param data_export_id: The data export rule ID. + :type data_export_id: str + :param all_tables: When ‘true’, all workspace's tables are exported. + :type all_tables: bool + :param table_names: An array of tables to export, for example: + [“Heartbeat, SecurityEvent”]. + :type table_names: list[str] + :param resource_id: Required. The destination resource ID. This can be + copied from the Properties entry of the destination resource in Azure. + :type resource_id: str + :ivar data_export_type: The type of the destination resource. Possible + values include: 'StorageAccount', 'EventHub' + :vartype data_export_type: str or ~azure.mgmt.loganalytics.models.Type + :param event_hub_name: Optional. Allows to define an Event Hub name. Not + applicable when destination is Storage Account. + :type event_hub_name: str + :param enable: Active when enabled. + :type enable: bool + :param created_date: The latest data export rule modification time. + :type created_date: str + :param last_modified_date: Date and time when the export was last + modified. + :type last_modified_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_id': {'required': True}, + 'data_export_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_export_id': {'key': 'properties.dataExportId', 'type': 'str'}, + 'all_tables': {'key': 'properties.allTables', 'type': 'bool'}, + 'table_names': {'key': 'properties.tableNames', 'type': '[str]'}, + 'resource_id': {'key': 'properties.destination.resourceId', 'type': 'str'}, + 'data_export_type': {'key': 'properties.destination.type', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.destination.metaData.eventHubName', 'type': 'str'}, + 'enable': {'key': 'properties.enable', 'type': 'bool'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'last_modified_date': {'key': 'properties.lastModifiedDate', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str, data_export_id: str=None, all_tables: bool=None, table_names=None, event_hub_name: str=None, enable: bool=None, created_date: str=None, last_modified_date: str=None, **kwargs) -> None: + super(DataExport, self).__init__(**kwargs) + self.data_export_id = data_export_id + self.all_tables = all_tables + self.table_names = table_names + self.resource_id = resource_id + self.data_export_type = None + self.event_hub_name = event_hub_name + self.enable = enable + self.created_date = created_date + self.last_modified_date = last_modified_date + + +class DataExportErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(DataExportErrorResponse, self).__init__(**kwargs) + self.error = error + + +class DataExportErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DataExportErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DataExportErrorResponseException, self).__init__(deserialize, response, 'DataExportErrorResponse', *args) + + +class DataSource(ProxyResource): + """Datasources under OMS Workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. + :type properties: object + :param e_tag: The ETag of the data source. + :type e_tag: str + :param kind: Required. Possible values include: 'WindowsEvent', + 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + 'LinuxSyslogCollection', 'LinuxPerformanceObject', + 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', + 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + 'SecurityWindowsBaselineConfiguration', + 'SecurityCenterSecurityWindowsBaselineConfiguration', + 'SecurityEventCollectionConfiguration', + 'SecurityInsightsSecurityEventCollectionConfiguration', + 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + 'ApplicationInsights', 'SqlDataClassification' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, properties, kind, e_tag: str=None, tags=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.properties = properties + self.e_tag = e_tag + self.kind = kind + self.tags = tags + + +class DataSourceFilter(Model): + """DataSource filter. Right now, only filter by kind is supported. + + :param kind: Possible values include: 'WindowsEvent', + 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + 'LinuxSyslogCollection', 'LinuxPerformanceObject', + 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', + 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + 'SecurityWindowsBaselineConfiguration', + 'SecurityCenterSecurityWindowsBaselineConfiguration', + 'SecurityEventCollectionConfiguration', + 'SecurityInsightsSecurityEventCollectionConfiguration', + 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + 'ApplicationInsights', 'SqlDataClassification' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kind + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.loganalytics.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.loganalytics.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: + 'SystemAssigned', 'None' + :type type: str or ~azure.mgmt.loganalytics.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, *, type, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class IntelligencePack(Model): + """Intelligence Pack containing a string name and boolean indicating if it's + enabled. + + :param name: The name of the intelligence pack. + :type name: str + :param enabled: The enabled boolean for the intelligence pack. + :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, enabled: bool=None, display_name: str=None, **kwargs) -> None: + super(IntelligencePack, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + self.display_name = display_name + + +class KeyVaultProperties(Model): + """The key vault properties. + + :param key_vault_uri: The Key Vault uri which holds they key associated + with the Log Analytics cluster. + :type key_vault_uri: str + :param key_name: The name of the key associated with the Log Analytics + cluster. + :type key_name: str + :param key_version: The version of the key associated with the Log + Analytics cluster. + :type key_version: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_name: str=None, key_version: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_name = key_name + self.key_version = key_version + + +class LinkedService(ProxyResource): + """The top level Linked service resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param resource_id: The resource id of the resource that will be linked to + the workspace. This should be used for linking resources which require + read access + :type resource_id: str + :param write_access_resource_id: The resource id of the resource that will + be linked to the workspace. This should be used for linking resources + which require write access + :type write_access_resource_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'write_access_resource_id': {'key': 'properties.writeAccessResourceId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, resource_id: str=None, write_access_resource_id: str=None, tags=None, **kwargs) -> None: + super(LinkedService, self).__init__(**kwargs) + self.resource_id = resource_id + self.write_access_resource_id = write_access_resource_id + self.tags = tags + + +class LinkedStorageAccountsResource(ProxyResource): + """Linked storage accounts top level resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar data_source_type: Linked storage accounts type. Possible values + include: 'CustomLogs', 'AzureWatson' + :vartype data_source_type: str or + ~azure.mgmt.loganalytics.models.DataSourceType + :param storage_account_ids: Linked storage accounts resources ids. + :type storage_account_ids: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_source_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_source_type': {'key': 'properties.dataSourceType', 'type': 'DataSourceType'}, + 'storage_account_ids': {'key': 'properties.storageAccountIds', 'type': '[str]'}, + } + + def __init__(self, *, storage_account_ids=None, **kwargs) -> None: + super(LinkedStorageAccountsResource, self).__init__(**kwargs) + self.data_source_type = None + self.storage_account_ids = storage_account_ids + + +class ManagementGroup(Model): + """A management group that is connected to a workspace. + + :param server_count: The number of servers connected to the management + group. + :type server_count: int + :param is_gateway: Gets or sets a value indicating whether the management + group is a gateway. + :type is_gateway: bool + :param name: The name of the management group. + :type name: str + :param id: The unique ID of the management group. + :type id: str + :param created: The datetime that the management group was created. + :type created: datetime + :param data_received: The last datetime that the management group received + data. + :type data_received: datetime + :param version: The version of System Center that is managing the + management group. + :type version: str + :param sku: The SKU of System Center that is managing the management + group. + :type sku: str + """ + + _attribute_map = { + 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, + 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'id': {'key': 'properties.id', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, server_count: int=None, is_gateway: bool=None, name: str=None, id: str=None, created=None, data_received=None, version: str=None, sku: str=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = server_count + self.is_gateway = is_gateway + self.name = name + self.id = id + self.created = created + self.data_received = data_received + self.version = version + self.sku = sku + + +class MetricName(Model): + """The name of a metric. + + :param value: The system name of the metric. + :type value: str + :param localized_value: The localized name of the metric. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationStatus(Model): + """The status of operation. + + :param id: The operation Id. + :type id: str + :param name: The operation name. + :type name: str + :param start_time: The start time of the operation. + :type start_time: str + :param end_time: The end time of the operation. + :type end_time: str + :param status: The status of the operation. + :type status: str + :param error: The error detail of the operation if any. + :type error: ~azure.mgmt.loganalytics.models.ErrorResponse + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, id: str=None, name: str=None, start_time: str=None, end_time: str=None, status: str=None, error=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.id = id + self.name = name + self.start_time = start_time + self.end_time = end_time + self.status = status + self.error = error + + +class PrivateLinkScopedResource(Model): + """The private link scope resource reference. + + :param resource_id: The full resource Id of the private link scope + resource. + :type resource_id: str + :param scope_id: The private link scope unique Identifier. + :type scope_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'scope_id': {'key': 'scopeId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, scope_id: str=None, **kwargs) -> None: + super(PrivateLinkScopedResource, self).__init__(**kwargs) + self.resource_id = resource_id + self.scope_id = scope_id + + +class SavedSearch(ProxyResource): + """Value object for saved search results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param e_tag: The ETag of the saved search. + :type e_tag: str + :param category: Required. The category of the saved search. This helps + the user to find a saved search faster. + :type category: str + :param display_name: Required. Saved search display name. + :type display_name: str + :param query: Required. The query expression for the saved search. Please + see + https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference + for reference. + :type query: str + :param version: The version number of the query language. The current + version is 2 and is the default. + :type version: long + :param tags: The tags attached to the saved search. + :type tags: list[~azure.mgmt.loganalytics.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'display_name': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'long'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, *, category: str, display_name: str, query: str, e_tag: str=None, version: int=None, tags=None, **kwargs) -> None: + super(SavedSearch, self).__init__(**kwargs) + self.e_tag = e_tag + self.category = category + self.display_name = display_name + self.query = query + self.version = version + self.tags = tags + + +class SavedSearchesListResult(Model): + """The saved search list operation response. + + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SavedSearch]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(SavedSearchesListResult, self).__init__(**kwargs) + self.value = value + + +class SharedKeys(Model): + """The shared keys for a workspace. + + :param primary_shared_key: The primary shared key of a workspace. + :type primary_shared_key: str + :param secondary_shared_key: The secondary shared key of a workspace. + :type secondary_shared_key: str + """ + + _attribute_map = { + 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, + 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, + } + + def __init__(self, *, primary_shared_key: str=None, secondary_shared_key: str=None, **kwargs) -> None: + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = primary_shared_key + self.secondary_shared_key = secondary_shared_key + + +class StorageAccount(Model): + """Describes a storage account connection. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Azure Resource Manager ID of the storage account + resource. + :type id: str + :param key: Required. The storage account key. + :type key: str + """ + + _validation = { + 'id': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, id: str, key: str, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.id = id + self.key = key + + +class StorageInsight(ProxyResource): + """The top level storage insight resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param containers: The names of the blob containers that the workspace + should read + :type containers: list[str] + :param tables: The names of the Azure tables that the workspace should + read + :type tables: list[str] + :param storage_account: Required. The storage account connection details + :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount + :ivar status: The status of the storage insight + :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus + :param e_tag: The ETag of the storage insight. + :type e_tag: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '[str]'}, + 'tables': {'key': 'properties.tables', 'type': '[str]'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, + 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, storage_account, containers=None, tables=None, e_tag: str=None, tags=None, **kwargs) -> None: + super(StorageInsight, self).__init__(**kwargs) + self.containers = containers + self.tables = tables + self.storage_account = storage_account + self.status = None + self.e_tag = e_tag + self.tags = tags + + +class StorageInsightStatus(Model): + """The status of the storage insight. + + All required parameters must be populated in order to send to Azure. + + :param state: Required. The state of the storage insight connection to the + workspace. Possible values include: 'OK', 'ERROR' + :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState + :param description: Description of the state of the storage insight. + :type description: str + """ + + _validation = { + 'state': {'required': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, state, description: str=None, **kwargs) -> None: + super(StorageInsightStatus, self).__init__(**kwargs) + self.state = state + self.description = description + + +class Tag(Model): + """A tag of a saved search. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The tag name. + :type name: str + :param value: Required. The tag value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(Tag, self).__init__(**kwargs) + self.name = name + self.value = value + + +class UsageMetric(Model): + """A metric describing the usage of a resource. + + :param name: The name of the metric. + :type name: ~azure.mgmt.loganalytics.models.MetricName + :param unit: The units used for the metric. + :type unit: str + :param current_value: The current value of the metric. + :type current_value: float + :param limit: The quota limit for the metric. + :type limit: float + :param next_reset_time: The time that the metric's value will reset. + :type next_reset_time: datetime + :param quota_period: The quota period that determines the length of time + between value resets. + :type quota_period: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + } + + def __init__(self, *, name=None, unit: str=None, current_value: float=None, limit: float=None, next_reset_time=None, quota_period: str=None, **kwargs) -> None: + super(UsageMetric, self).__init__(**kwargs) + self.name = name + self.unit = unit + self.current_value = current_value + self.limit = limit + self.next_reset_time = next_reset_time + self.quota_period = quota_period + + +class Workspace(TrackedResource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param public_network_access_for_ingestion: The network access type for + accessing Log Analytics ingestion. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_ingestion: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param public_network_access_for_query: The network access type for + accessing Log Analytics query. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_query: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :ivar private_link_scoped_resources: List of linked private link scope + resources. + :vartype private_link_scoped_resources: + list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param e_tag: The ETag of the workspace. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'customer_id': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + 'private_link_scoped_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, + 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, provisioning_state=None, sku=None, retention_in_days: int=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", e_tag: str=None, **kwargs) -> None: + super(Workspace, self).__init__(tags=tags, location=location, **kwargs) + self.provisioning_state = provisioning_state + self.customer_id = None + self.sku = sku + self.retention_in_days = retention_in_days + self.public_network_access_for_ingestion = public_network_access_for_ingestion + self.public_network_access_for_query = public_network_access_for_query + self.private_link_scoped_resources = None + self.e_tag = e_tag + + +class WorkspacePatch(AzureEntityResource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param public_network_access_for_ingestion: The network access type for + accessing Log Analytics ingestion. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_ingestion: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param public_network_access_for_query: The network access type for + accessing Log Analytics query. Possible values include: 'Enabled', + 'Disabled'. Default value: "Enabled" . + :type public_network_access_for_query: str or + ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :ivar private_link_scoped_resources: List of linked private link scope + resources. + :vartype private_link_scoped_resources: + list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param tags: Resource tags. Optional. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + 'private_link_scoped_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, + 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, provisioning_state=None, sku=None, retention_in_days: int=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", tags=None, **kwargs) -> None: + super(WorkspacePatch, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + self.customer_id = None + self.sku = sku + self.retention_in_days = retention_in_days + self.public_network_access_for_ingestion = public_network_access_for_ingestion + self.public_network_access_for_query = public_network_access_for_query + self.private_link_scoped_resources = None + self.tags = tags + + +class WorkspaceSku(Model): + """The SKU (tier) of a workspace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + 'CapacityReservation' + :type name: str or ~azure.mgmt.loganalytics.models.WorkspaceSkuNameEnum + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(WorkspaceSku, self).__init__(**kwargs) + self.name = name diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py new file mode 100644 index 000000000000..f1170dbd55cd --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py @@ -0,0 +1,105 @@ +# 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 enum import Enum + + +class Type(str, Enum): + + storage_account = "StorageAccount" + event_hub = "EventHub" + + +class DataSourceKind(str, Enum): + + windows_event = "WindowsEvent" + windows_performance_counter = "WindowsPerformanceCounter" + iis_logs = "IISLogs" + linux_syslog = "LinuxSyslog" + linux_syslog_collection = "LinuxSyslogCollection" + linux_performance_object = "LinuxPerformanceObject" + linux_performance_collection = "LinuxPerformanceCollection" + custom_log = "CustomLog" + custom_log_collection = "CustomLogCollection" + azure_audit_log = "AzureAuditLog" + azure_activity_log = "AzureActivityLog" + generic_data_source = "GenericDataSource" + change_tracking_custom_path = "ChangeTrackingCustomPath" + change_tracking_path = "ChangeTrackingPath" + change_tracking_services = "ChangeTrackingServices" + change_tracking_data_type_configuration = "ChangeTrackingDataTypeConfiguration" + change_tracking_default_registry = "ChangeTrackingDefaultRegistry" + change_tracking_registry = "ChangeTrackingRegistry" + change_tracking_linux_path = "ChangeTrackingLinuxPath" + linux_change_tracking_path = "LinuxChangeTrackingPath" + change_tracking_content_location = "ChangeTrackingContentLocation" + windows_telemetry = "WindowsTelemetry" + office365 = "Office365" + security_windows_baseline_configuration = "SecurityWindowsBaselineConfiguration" + security_center_security_windows_baseline_configuration = "SecurityCenterSecurityWindowsBaselineConfiguration" + security_event_collection_configuration = "SecurityEventCollectionConfiguration" + security_insights_security_event_collection_configuration = "SecurityInsightsSecurityEventCollectionConfiguration" + import_computer_group = "ImportComputerGroup" + network_monitoring = "NetworkMonitoring" + itsm = "Itsm" + dns_analytics = "DnsAnalytics" + application_insights = "ApplicationInsights" + sql_data_classification = "SqlDataClassification" + + +class DataSourceType(str, Enum): + + custom_logs = "CustomLogs" + azure_watson = "AzureWatson" + + +class WorkspaceSkuNameEnum(str, Enum): + + free = "Free" + standard = "Standard" + premium = "Premium" + per_node = "PerNode" + per_gb2018 = "PerGB2018" + standalone = "Standalone" + capacity_reservation = "CapacityReservation" + + +class EntityStatus(str, Enum): + + creating = "Creating" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + deleting = "Deleting" + provisioning_account = "ProvisioningAccount" + + +class PublicNetworkAccessType(str, Enum): + + enabled = "Enabled" #: Enables connectivity to Log Analytics through public DNS. + disabled = "Disabled" #: Disables public connectivity to Log Analytics through public DNS. + + +class ClusterSkuNameEnum(str, Enum): + + capacity_reservation = "CapacityReservation" + + +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + none = "None" + + +class StorageInsightState(str, Enum): + + ok = "OK" + error = "ERROR" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py new file mode 100644 index 000000000000..739b95705fa3 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py @@ -0,0 +1,144 @@ +# 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 msrest.paging import Paged + + +class DataExportPaged(Paged): + """ + A paging container for iterating over a list of :class:`DataExport ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataExport]'} + } + + def __init__(self, *args, **kwargs): + + super(DataExportPaged, self).__init__(*args, **kwargs) +class DataSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataSource]'} + } + + def __init__(self, *args, **kwargs): + + super(DataSourcePaged, self).__init__(*args, **kwargs) +class ManagementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagementGroupPaged, self).__init__(*args, **kwargs) +class UsageMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`UsageMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UsageMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(UsageMetricPaged, self).__init__(*args, **kwargs) +class WorkspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Workspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workspace]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspacePaged, self).__init__(*args, **kwargs) +class LinkedServicePaged(Paged): + """ + A paging container for iterating over a list of :class:`LinkedService ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LinkedService]'} + } + + def __init__(self, *args, **kwargs): + + super(LinkedServicePaged, self).__init__(*args, **kwargs) +class LinkedStorageAccountsResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`LinkedStorageAccountsResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LinkedStorageAccountsResource]'} + } + + def __init__(self, *args, **kwargs): + + super(LinkedStorageAccountsResourcePaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`Cluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Cluster]'} + } + + def __init__(self, *args, **kwargs): + + super(ClusterPaged, self).__init__(*args, **kwargs) +class StorageInsightPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageInsight ` object + """ + + _attribute_map = { + 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageInsight]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageInsightPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py deleted file mode 100644 index 8facbdb80089..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class CoreSummary(Model): - """The core summary of a search. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of a core summary. - :type status: str - :param number_of_documents: Required. The number of documents of a core - summary. - :type number_of_documents: long - """ - - _validation = { - 'number_of_documents': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(CoreSummary, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.number_of_documents = kwargs.get('number_of_documents', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py deleted file mode 100644 index adb9e80f5479..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class CoreSummary(Model): - """The core summary of a search. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of a core summary. - :type status: str - :param number_of_documents: Required. The number of documents of a core - summary. - :type number_of_documents: long - """ - - _validation = { - 'number_of_documents': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, - } - - def __init__(self, *, number_of_documents: int, status: str=None, **kwargs) -> None: - super(CoreSummary, self).__init__(**kwargs) - self.status = status - self.number_of_documents = number_of_documents diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py deleted file mode 100644 index 025239663f3c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class DataSource(ProxyResource): - """Datasources under OMS Workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. The data source properties in raw json - format, each kind of data source have it's own schema. - :type properties: object - :param e_tag: The ETag of the data source. - :type e_tag: str - :param kind: Required. Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataSource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.e_tag = kwargs.get('e_tag', None) - self.kind = kwargs.get('kind', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py deleted file mode 100644 index 8a45a5250d77..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 msrest.serialization import Model - - -class DataSourceFilter(Model): - """DataSource filter. Right now, only filter by kind is supported. - - :param kind: Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataSourceFilter, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py deleted file mode 100644 index e597802b8392..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 msrest.serialization import Model - - -class DataSourceFilter(Model): - """DataSource filter. Right now, only filter by kind is supported. - - :param kind: Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(DataSourceFilter, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py deleted file mode 100644 index 9ee8cc141555..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class DataSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataSource]'} - } - - def __init__(self, *args, **kwargs): - - super(DataSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py deleted file mode 100644 index d0f5e0bd78b6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class DataSource(ProxyResource): - """Datasources under OMS Workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. The data source properties in raw json - format, each kind of data source have it's own schema. - :type properties: object - :param e_tag: The ETag of the data source. - :type e_tag: str - :param kind: Required. Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, properties, kind, tags=None, e_tag: str=None, **kwargs) -> None: - super(DataSource, self).__init__(tags=tags, **kwargs) - self.properties = properties - self.e_tag = e_tag - self.kind = kind diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py deleted file mode 100644 index d65fb7ef0989..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 msrest.serialization import Model - - -class IntelligencePack(Model): - """Intelligence Pack containing a string name and boolean indicating if it's - enabled. - - :param name: The name of the intelligence pack. - :type name: str - :param enabled: The enabled boolean for the intelligence pack. - :type enabled: bool - :param display_name: The display name of the intelligence pack. - :type display_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntelligencePack, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.enabled = kwargs.get('enabled', None) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py deleted file mode 100644 index 0cc4b30790a1..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 msrest.serialization import Model - - -class IntelligencePack(Model): - """Intelligence Pack containing a string name and boolean indicating if it's - enabled. - - :param name: The name of the intelligence pack. - :type name: str - :param enabled: The enabled boolean for the intelligence pack. - :type enabled: bool - :param display_name: The display name of the intelligence pack. - :type display_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, enabled: bool=None, display_name: str=None, **kwargs) -> None: - super(IntelligencePack, self).__init__(**kwargs) - self.name = name - self.enabled = enabled - self.display_name = display_name diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py deleted file mode 100644 index bd3839982bd6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class LinkTarget(Model): - """Metadata for a workspace that isn't linked to an Azure subscription. - - :param customer_id: The GUID that uniquely identifies the workspace. - :type customer_id: str - :param display_name: The display name of the workspace. - :type display_name: str - :param workspace_name: The DNS valid workspace name. - :type workspace_name: str - :param location: The location of the workspace. - :type location: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'display_name': {'key': 'accountName', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkTarget, self).__init__(**kwargs) - self.customer_id = kwargs.get('customer_id', None) - self.display_name = kwargs.get('display_name', None) - self.workspace_name = kwargs.get('workspace_name', None) - self.location = kwargs.get('location', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py deleted file mode 100644 index cbc600ad0573..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class LinkTarget(Model): - """Metadata for a workspace that isn't linked to an Azure subscription. - - :param customer_id: The GUID that uniquely identifies the workspace. - :type customer_id: str - :param display_name: The display name of the workspace. - :type display_name: str - :param workspace_name: The DNS valid workspace name. - :type workspace_name: str - :param location: The location of the workspace. - :type location: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'display_name': {'key': 'accountName', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, customer_id: str=None, display_name: str=None, workspace_name: str=None, location: str=None, **kwargs) -> None: - super(LinkTarget, self).__init__(**kwargs) - self.customer_id = customer_id - self.display_name = display_name - self.workspace_name = workspace_name - self.location = location diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py deleted file mode 100644 index 3ffe0205654e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class LinkedService(ProxyResource): - """The top level Linked service resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param resource_id: Required. The resource id of the resource that will be - linked to the workspace. - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkedService, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py deleted file mode 100644 index 92f1945e8f28..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class LinkedServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`LinkedService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LinkedService]'} - } - - def __init__(self, *args, **kwargs): - - super(LinkedServicePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py deleted file mode 100644 index 2717ac4bd8a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class LinkedService(ProxyResource): - """The top level Linked service resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param resource_id: Required. The resource id of the resource that will be - linked to the workspace. - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str, tags=None, **kwargs) -> None: - super(LinkedService, self).__init__(tags=tags, **kwargs) - self.resource_id = resource_id diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py deleted file mode 100644 index 22641d5bc333..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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 enum import Enum - - -class SearchSortEnum(str, Enum): - - asc = "asc" - desc = "desc" - - -class StorageInsightState(str, Enum): - - ok = "OK" - error = "ERROR" - - -class PurgeState(str, Enum): - - pending = "Pending" - completed = "Completed" - - -class DataSourceKind(str, Enum): - - azure_activity_log = "AzureActivityLog" - change_tracking_path = "ChangeTrackingPath" - change_tracking_default_path = "ChangeTrackingDefaultPath" - change_tracking_default_registry = "ChangeTrackingDefaultRegistry" - change_tracking_custom_registry = "ChangeTrackingCustomRegistry" - custom_log = "CustomLog" - custom_log_collection = "CustomLogCollection" - generic_data_source = "GenericDataSource" - iis_logs = "IISLogs" - linux_performance_object = "LinuxPerformanceObject" - linux_performance_collection = "LinuxPerformanceCollection" - linux_syslog = "LinuxSyslog" - linux_syslog_collection = "LinuxSyslogCollection" - windows_event = "WindowsEvent" - windows_performance_counter = "WindowsPerformanceCounter" - - -class SkuNameEnum(str, Enum): - - free = "Free" - standard = "Standard" - premium = "Premium" - unlimited = "Unlimited" - per_node = "PerNode" - per_gb2018 = "PerGB2018" - standalone = "Standalone" - - -class EntityStatus(str, Enum): - - creating = "Creating" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - deleting = "Deleting" - provisioning_account = "ProvisioningAccount" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py deleted file mode 100644 index 1b79c460ce45..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 msrest.serialization import Model - - -class ManagementGroup(Model): - """A management group that is connected to a workspace. - - :param server_count: The number of servers connected to the management - group. - :type server_count: int - :param is_gateway: Gets or sets a value indicating whether the management - group is a gateway. - :type is_gateway: bool - :param name: The name of the management group. - :type name: str - :param id: The unique ID of the management group. - :type id: str - :param created: The datetime that the management group was created. - :type created: datetime - :param data_received: The last datetime that the management group received - data. - :type data_received: datetime - :param version: The version of System Center that is managing the - management group. - :type version: str - :param sku: The SKU of System Center that is managing the management - group. - :type sku: str - """ - - _attribute_map = { - 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, - 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'id': {'key': 'properties.id', 'type': 'str'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagementGroup, self).__init__(**kwargs) - self.server_count = kwargs.get('server_count', None) - self.is_gateway = kwargs.get('is_gateway', None) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.created = kwargs.get('created', None) - self.data_received = kwargs.get('data_received', None) - self.version = kwargs.get('version', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py deleted file mode 100644 index 04ad8581510f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class ManagementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py deleted file mode 100644 index 5a0d9a535bfe..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 msrest.serialization import Model - - -class ManagementGroup(Model): - """A management group that is connected to a workspace. - - :param server_count: The number of servers connected to the management - group. - :type server_count: int - :param is_gateway: Gets or sets a value indicating whether the management - group is a gateway. - :type is_gateway: bool - :param name: The name of the management group. - :type name: str - :param id: The unique ID of the management group. - :type id: str - :param created: The datetime that the management group was created. - :type created: datetime - :param data_received: The last datetime that the management group received - data. - :type data_received: datetime - :param version: The version of System Center that is managing the - management group. - :type version: str - :param sku: The SKU of System Center that is managing the management - group. - :type sku: str - """ - - _attribute_map = { - 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, - 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'id': {'key': 'properties.id', 'type': 'str'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, *, server_count: int=None, is_gateway: bool=None, name: str=None, id: str=None, created=None, data_received=None, version: str=None, sku: str=None, **kwargs) -> None: - super(ManagementGroup, self).__init__(**kwargs) - self.server_count = server_count - self.is_gateway = is_gateway - self.name = name - self.id = id - self.created = created - self.data_received = data_received - self.version = version - self.sku = sku diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py deleted file mode 100644 index 36482f58ac5f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class MetricName(Model): - """The name of a metric. - - :param value: The system name of the metric. - :type value: str - :param localized_value: The localized name of the metric. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py deleted file mode 100644 index 515822cf3d47..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class MetricName(Model): - """The name of a metric. - - :param value: The system name of the metric. - :type value: str - :param localized_value: The localized name of the metric. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py deleted file mode 100644 index 26d84d4315aa..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class Operation(Model): - """Supported operation of OperationalInsights resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.loganalytics.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py deleted file mode 100644 index 97f173941c27..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft OperationsManagement. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py deleted file mode 100644 index c5c2afad0bef..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft OperationsManagement. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py deleted file mode 100644 index e9cb0c61e3f6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py deleted file mode 100644 index 22e7ddff5ccf..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class Operation(Model): - """Supported operation of OperationalInsights resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.loganalytics.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py deleted file mode 100644 index e15c31fdd01f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 msrest.serialization import Model - - -class ProxyResource(Model): - """Common properties of proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py deleted file mode 100644 index 89cd0dab699f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 msrest.serialization import Model - - -class ProxyResource(Model): - """Common properties of proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py deleted file mode 100644 index 8e4d6b9bdb23..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py deleted file mode 100644 index 95d57d535d37..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py deleted file mode 100644 index 7617dcd99070..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 msrest.serialization import Model - - -class SavedSearch(Model): - """Value object for saved search results. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The id of the saved search. - :vartype id: str - :ivar name: The name of the saved search. - :vartype name: str - :ivar type: The type of the saved search. - :vartype type: str - :param e_tag: The etag of the saved search. - :type e_tag: str - :param category: Required. The category of the saved search. This helps - the user to find a saved search faster. - :type category: str - :param display_name: Required. Saved search display name. - :type display_name: str - :param query: Required. The query expression for the saved search. Please - see - https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference - for reference. - :type query: str - :param version: Required. The version number of the query lanuage. Only - verion 1 is allowed here. - :type version: long - :param tags: The tags attached to the saved search. - :type tags: list[~azure.mgmt.loganalytics.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'display_name': {'required': True}, - 'query': {'required': True}, - 'version': {'required': True, 'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'query': {'key': 'properties.query', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'long'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, **kwargs): - super(SavedSearch, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = kwargs.get('e_tag', None) - self.category = kwargs.get('category', None) - self.display_name = kwargs.get('display_name', None) - self.query = kwargs.get('query', None) - self.version = kwargs.get('version', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py deleted file mode 100644 index a994394bfc7a..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 msrest.serialization import Model - - -class SavedSearch(Model): - """Value object for saved search results. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The id of the saved search. - :vartype id: str - :ivar name: The name of the saved search. - :vartype name: str - :ivar type: The type of the saved search. - :vartype type: str - :param e_tag: The etag of the saved search. - :type e_tag: str - :param category: Required. The category of the saved search. This helps - the user to find a saved search faster. - :type category: str - :param display_name: Required. Saved search display name. - :type display_name: str - :param query: Required. The query expression for the saved search. Please - see - https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference - for reference. - :type query: str - :param version: Required. The version number of the query lanuage. Only - verion 1 is allowed here. - :type version: long - :param tags: The tags attached to the saved search. - :type tags: list[~azure.mgmt.loganalytics.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'display_name': {'required': True}, - 'query': {'required': True}, - 'version': {'required': True, 'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'query': {'key': 'properties.query', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'long'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, *, category: str, display_name: str, query: str, version: int, e_tag: str=None, tags=None, **kwargs) -> None: - super(SavedSearch, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = e_tag - self.category = category - self.display_name = display_name - self.query = query - self.version = version - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py deleted file mode 100644 index 74509ad4e0d2..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SavedSearchesListResult(Model): - """The saved search operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] - """ - - _attribute_map = { - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SavedSearch]'}, - } - - def __init__(self, **kwargs): - super(SavedSearchesListResult, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py deleted file mode 100644 index 10f174732fdc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SavedSearchesListResult(Model): - """The saved search operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] - """ - - _attribute_map = { - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SavedSearch]'}, - } - - def __init__(self, *, metadata=None, value=None, **kwargs) -> None: - super(SavedSearchesListResult, self).__init__(**kwargs) - self.metadata = metadata - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py deleted file mode 100644 index 159823f38749..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchError(Model): - """Details for a search error. - - :param type: The error type. - :type type: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchError, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.message = kwargs.get('message', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py deleted file mode 100644 index 9b093afea61d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchError(Model): - """Details for a search error. - - :param type: The error type. - :type type: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, message: str=None, **kwargs) -> None: - super(SearchError, self).__init__(**kwargs) - self.type = type - self.message = message diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py deleted file mode 100644 index 91e914734fc0..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchGetSchemaResponse(Model): - """The get schema operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, - } - - def __init__(self, **kwargs): - super(SearchGetSchemaResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py deleted file mode 100644 index 7d64e05b18df..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchGetSchemaResponse(Model): - """The get schema operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, - } - - def __init__(self, *, metadata=None, value=None, **kwargs) -> None: - super(SearchGetSchemaResponse, self).__init__(**kwargs) - self.metadata = metadata - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py deleted file mode 100644 index d4b7b292cb1c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchHighlight(Model): - """Highlight details. - - :param pre: The string that is put before a matched result. - :type pre: str - :param post: The string that is put after a matched result. - :type post: str - """ - - _attribute_map = { - 'pre': {'key': 'pre', 'type': 'str'}, - 'post': {'key': 'post', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchHighlight, self).__init__(**kwargs) - self.pre = kwargs.get('pre', None) - self.post = kwargs.get('post', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py deleted file mode 100644 index d427d47c3824..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchHighlight(Model): - """Highlight details. - - :param pre: The string that is put before a matched result. - :type pre: str - :param post: The string that is put after a matched result. - :type post: str - """ - - _attribute_map = { - 'pre': {'key': 'pre', 'type': 'str'}, - 'post': {'key': 'post', 'type': 'str'}, - } - - def __init__(self, *, pre: str=None, post: str=None, **kwargs) -> None: - super(SearchHighlight, self).__init__(**kwargs) - self.pre = pre - self.post = post diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py deleted file mode 100644 index ba7f7a3dcffc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchMetadata(Model): - """Metadata for search results. - - :param search_id: The request id of the search. - :type search_id: str - :param result_type: The search result type. - :type result_type: str - :param total: The total number of search results. - :type total: long - :param top: The number of top search results. - :type top: long - :param id: The id of the search results request. - :type id: str - :param core_summaries: The core summaries. - :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] - :param status: The status of the search results. - :type status: str - :param start_time: The start time for the search. - :type start_time: datetime - :param last_updated: The time of last update. - :type last_updated: datetime - :param e_tag: The ETag of the search results. - :type e_tag: str - :param sort: How the results are sorted. - :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] - :param request_time: The request time. - :type request_time: long - :param aggregated_value_field: The aggregated value field. - :type aggregated_value_field: str - :param aggregated_grouping_fields: The aggregated grouping fields. - :type aggregated_grouping_fields: str - :param sum: The sum of all aggregates returned in the result set. - :type sum: long - :param max: The max of all aggregates returned in the result set. - :type max: long - :param schema: The schema. - :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema - """ - - _attribute_map = { - 'search_id': {'key': 'requestId', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'total': {'key': 'total', 'type': 'long'}, - 'top': {'key': 'top', 'type': 'long'}, - 'id': {'key': 'id', 'type': 'str'}, - 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'sort': {'key': 'sort', 'type': '[SearchSort]'}, - 'request_time': {'key': 'requestTime', 'type': 'long'}, - 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, - 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, - 'sum': {'key': 'sum', 'type': 'long'}, - 'max': {'key': 'max', 'type': 'long'}, - 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, - } - - def __init__(self, **kwargs): - super(SearchMetadata, self).__init__(**kwargs) - self.search_id = kwargs.get('search_id', None) - self.result_type = kwargs.get('result_type', None) - self.total = kwargs.get('total', None) - self.top = kwargs.get('top', None) - self.id = kwargs.get('id', None) - self.core_summaries = kwargs.get('core_summaries', None) - self.status = kwargs.get('status', None) - self.start_time = kwargs.get('start_time', None) - self.last_updated = kwargs.get('last_updated', None) - self.e_tag = kwargs.get('e_tag', None) - self.sort = kwargs.get('sort', None) - self.request_time = kwargs.get('request_time', None) - self.aggregated_value_field = kwargs.get('aggregated_value_field', None) - self.aggregated_grouping_fields = kwargs.get('aggregated_grouping_fields', None) - self.sum = kwargs.get('sum', None) - self.max = kwargs.get('max', None) - self.schema = kwargs.get('schema', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py deleted file mode 100644 index 11793a3e9b88..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchMetadata(Model): - """Metadata for search results. - - :param search_id: The request id of the search. - :type search_id: str - :param result_type: The search result type. - :type result_type: str - :param total: The total number of search results. - :type total: long - :param top: The number of top search results. - :type top: long - :param id: The id of the search results request. - :type id: str - :param core_summaries: The core summaries. - :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] - :param status: The status of the search results. - :type status: str - :param start_time: The start time for the search. - :type start_time: datetime - :param last_updated: The time of last update. - :type last_updated: datetime - :param e_tag: The ETag of the search results. - :type e_tag: str - :param sort: How the results are sorted. - :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] - :param request_time: The request time. - :type request_time: long - :param aggregated_value_field: The aggregated value field. - :type aggregated_value_field: str - :param aggregated_grouping_fields: The aggregated grouping fields. - :type aggregated_grouping_fields: str - :param sum: The sum of all aggregates returned in the result set. - :type sum: long - :param max: The max of all aggregates returned in the result set. - :type max: long - :param schema: The schema. - :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema - """ - - _attribute_map = { - 'search_id': {'key': 'requestId', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'total': {'key': 'total', 'type': 'long'}, - 'top': {'key': 'top', 'type': 'long'}, - 'id': {'key': 'id', 'type': 'str'}, - 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'sort': {'key': 'sort', 'type': '[SearchSort]'}, - 'request_time': {'key': 'requestTime', 'type': 'long'}, - 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, - 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, - 'sum': {'key': 'sum', 'type': 'long'}, - 'max': {'key': 'max', 'type': 'long'}, - 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, - } - - def __init__(self, *, search_id: str=None, result_type: str=None, total: int=None, top: int=None, id: str=None, core_summaries=None, status: str=None, start_time=None, last_updated=None, e_tag: str=None, sort=None, request_time: int=None, aggregated_value_field: str=None, aggregated_grouping_fields: str=None, sum: int=None, max: int=None, schema=None, **kwargs) -> None: - super(SearchMetadata, self).__init__(**kwargs) - self.search_id = search_id - self.result_type = result_type - self.total = total - self.top = top - self.id = id - self.core_summaries = core_summaries - self.status = status - self.start_time = start_time - self.last_updated = last_updated - self.e_tag = e_tag - self.sort = sort - self.request_time = request_time - self.aggregated_value_field = aggregated_value_field - self.aggregated_grouping_fields = aggregated_grouping_fields - self.sum = sum - self.max = max - self.schema = schema diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py deleted file mode 100644 index 81238273f963..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchMetadataSchema(Model): - """Schema metadata for search. - - :param name: The name of the metadata schema. - :type name: str - :param version: The version of the metadata schema. - :type version: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SearchMetadataSchema, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py deleted file mode 100644 index 530524c2606d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchMetadataSchema(Model): - """Schema metadata for search. - - :param name: The name of the metadata schema. - :type name: str - :param version: The version of the metadata schema. - :type version: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, version: int=None, **kwargs) -> None: - super(SearchMetadataSchema, self).__init__(**kwargs) - self.name = name - self.version = version diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py deleted file mode 100644 index 721438021b2d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchParameters(Model): - """Parameters specifying the search query and range. - - All required parameters must be populated in order to send to Azure. - - :param top: The number to get from the top. - :type top: long - :param highlight: The highlight that looks for all occurences of a string. - :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight - :param query: Required. The query to search. - :type query: str - :param start: The start date filter, so the only query results returned - are after this date. - :type start: datetime - :param end: The end date filter, so the only query results returned are - before this date. - :type end: datetime - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'long'}, - 'highlight': {'key': 'highlight', 'type': 'SearchHighlight'}, - 'query': {'key': 'query', 'type': 'str'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SearchParameters, self).__init__(**kwargs) - self.top = kwargs.get('top', None) - self.highlight = kwargs.get('highlight', None) - self.query = kwargs.get('query', None) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py deleted file mode 100644 index 8789f694abfc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchParameters(Model): - """Parameters specifying the search query and range. - - All required parameters must be populated in order to send to Azure. - - :param top: The number to get from the top. - :type top: long - :param highlight: The highlight that looks for all occurences of a string. - :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight - :param query: Required. The query to search. - :type query: str - :param start: The start date filter, so the only query results returned - are after this date. - :type start: datetime - :param end: The end date filter, so the only query results returned are - before this date. - :type end: datetime - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'long'}, - 'highlight': {'key': 'highlight', 'type': 'SearchHighlight'}, - 'query': {'key': 'query', 'type': 'str'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, query: str, top: int=None, highlight=None, start=None, end=None, **kwargs) -> None: - super(SearchParameters, self).__init__(**kwargs) - self.top = top - self.highlight = highlight - self.query = query - self.start = start - self.end = end diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py deleted file mode 100644 index 88b9f99bcfe0..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchResultsResponse(Model): - """The get search result operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the search, which includes the full url. - :vartype id: str - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[object] - :param error: The error. - :type error: ~azure.mgmt.loganalytics.models.SearchError - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[object]'}, - 'error': {'key': 'error', 'type': 'SearchError'}, - } - - def __init__(self, **kwargs): - super(SearchResultsResponse, self).__init__(**kwargs) - self.id = None - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) - self.error = kwargs.get('error', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py deleted file mode 100644 index 414d2aae709b..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchResultsResponse(Model): - """The get search result operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the search, which includes the full url. - :vartype id: str - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[object] - :param error: The error. - :type error: ~azure.mgmt.loganalytics.models.SearchError - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[object]'}, - 'error': {'key': 'error', 'type': 'SearchError'}, - } - - def __init__(self, *, metadata=None, value=None, error=None, **kwargs) -> None: - super(SearchResultsResponse, self).__init__(**kwargs) - self.id = None - self.metadata = metadata - self.value = value - self.error = error diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py deleted file mode 100644 index 56fe3e7089a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchSchemaValue(Model): - """Value object for schema results. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the schema. - :type name: str - :param display_name: The display name of the schema. - :type display_name: str - :param type: The type. - :type type: str - :param indexed: Required. The boolean that indicates the field is - searchable as free text. - :type indexed: bool - :param stored: Required. The boolean that indicates whether or not the - field is stored. - :type stored: bool - :param facet: Required. The boolean that indicates whether or not the - field is a facet. - :type facet: bool - :param owner_type: The array of workflows containing the field. - :type owner_type: list[str] - """ - - _validation = { - 'indexed': {'required': True}, - 'stored': {'required': True}, - 'facet': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'indexed': {'key': 'indexed', 'type': 'bool'}, - 'stored': {'key': 'stored', 'type': 'bool'}, - 'facet': {'key': 'facet', 'type': 'bool'}, - 'owner_type': {'key': 'ownerType', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(SearchSchemaValue, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.type = kwargs.get('type', None) - self.indexed = kwargs.get('indexed', None) - self.stored = kwargs.get('stored', None) - self.facet = kwargs.get('facet', None) - self.owner_type = kwargs.get('owner_type', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py deleted file mode 100644 index f29fd92f0aa4..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchSchemaValue(Model): - """Value object for schema results. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the schema. - :type name: str - :param display_name: The display name of the schema. - :type display_name: str - :param type: The type. - :type type: str - :param indexed: Required. The boolean that indicates the field is - searchable as free text. - :type indexed: bool - :param stored: Required. The boolean that indicates whether or not the - field is stored. - :type stored: bool - :param facet: Required. The boolean that indicates whether or not the - field is a facet. - :type facet: bool - :param owner_type: The array of workflows containing the field. - :type owner_type: list[str] - """ - - _validation = { - 'indexed': {'required': True}, - 'stored': {'required': True}, - 'facet': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'indexed': {'key': 'indexed', 'type': 'bool'}, - 'stored': {'key': 'stored', 'type': 'bool'}, - 'facet': {'key': 'facet', 'type': 'bool'}, - 'owner_type': {'key': 'ownerType', 'type': '[str]'}, - } - - def __init__(self, *, indexed: bool, stored: bool, facet: bool, name: str=None, display_name: str=None, type: str=None, owner_type=None, **kwargs) -> None: - super(SearchSchemaValue, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.type = type - self.indexed = indexed - self.stored = stored - self.facet = facet - self.owner_type = owner_type diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py deleted file mode 100644 index 2abb299ee3fd..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchSort(Model): - """The sort parameters for search. - - :param name: The name of the field the search query is sorted on. - :type name: str - :param order: The sort order of the search. Possible values include: - 'asc', 'desc' - :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchSort, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order = kwargs.get('order', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py deleted file mode 100644 index 2e6c85535685..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 msrest.serialization import Model - - -class SearchSort(Model): - """The sort parameters for search. - - :param name: The name of the field the search query is sorted on. - :type name: str - :param order: The sort order of the search. Possible values include: - 'asc', 'desc' - :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, order=None, **kwargs) -> None: - super(SearchSort, self).__init__(**kwargs) - self.name = name - self.order = order diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py deleted file mode 100644 index 416c872cbbfe..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SharedKeys(Model): - """The shared keys for a workspace. - - :param primary_shared_key: The primary shared key of a workspace. - :type primary_shared_key: str - :param secondary_shared_key: The secondary shared key of a workspace. - :type secondary_shared_key: str - """ - - _attribute_map = { - 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, - 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SharedKeys, self).__init__(**kwargs) - self.primary_shared_key = kwargs.get('primary_shared_key', None) - self.secondary_shared_key = kwargs.get('secondary_shared_key', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py deleted file mode 100644 index 922f0b31cd8e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 msrest.serialization import Model - - -class SharedKeys(Model): - """The shared keys for a workspace. - - :param primary_shared_key: The primary shared key of a workspace. - :type primary_shared_key: str - :param secondary_shared_key: The secondary shared key of a workspace. - :type secondary_shared_key: str - """ - - _attribute_map = { - 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, - 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, - } - - def __init__(self, *, primary_shared_key: str=None, secondary_shared_key: str=None, **kwargs) -> None: - super(SharedKeys, self).__init__(**kwargs) - self.primary_shared_key = primary_shared_key - self.secondary_shared_key = secondary_shared_key diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py deleted file mode 100644 index 73f09793dec9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class Sku(Model): - """The SKU (tier) of a workspace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: - 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - 'Standalone' - :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py deleted file mode 100644 index 41a0c3d4b36b..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class Sku(Model): - """The SKU (tier) of a workspace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: - 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - 'Standalone' - :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py deleted file mode 100644 index d336824ca20c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class StorageAccount(Model): - """Describes a storage account connection. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Azure Resource Manager ID of the storage account - resource. - :type id: str - :param key: Required. The storage account key. - :type key: str - """ - - _validation = { - 'id': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageAccount, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.key = kwargs.get('key', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py deleted file mode 100644 index 1df1cc8e83bb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class StorageAccount(Model): - """Describes a storage account connection. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Azure Resource Manager ID of the storage account - resource. - :type id: str - :param key: Required. The storage account key. - :type key: str - """ - - _validation = { - 'id': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, id: str, key: str, **kwargs) -> None: - super(StorageAccount, self).__init__(**kwargs) - self.id = id - self.key = key diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py deleted file mode 100644 index ce9b749756c2..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class StorageInsight(ProxyResource): - """The top level storage insight resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param containers: The names of the blob containers that the workspace - should read - :type containers: list[str] - :param tables: The names of the Azure tables that the workspace should - read - :type tables: list[str] - :param storage_account: Required. The storage account connection details - :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount - :ivar status: The status of the storage insight - :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus - :param e_tag: The ETag of the storage insight. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'containers': {'key': 'properties.containers', 'type': '[str]'}, - 'tables': {'key': 'properties.tables', 'type': '[str]'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, - 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageInsight, self).__init__(**kwargs) - self.containers = kwargs.get('containers', None) - self.tables = kwargs.get('tables', None) - self.storage_account = kwargs.get('storage_account', None) - self.status = None - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py deleted file mode 100644 index 8aa6b40efaa4..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class StorageInsightPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageInsight ` object - """ - - _attribute_map = { - 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageInsight]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageInsightPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py deleted file mode 100644 index 17c3f9624aa9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class StorageInsight(ProxyResource): - """The top level storage insight resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param containers: The names of the blob containers that the workspace - should read - :type containers: list[str] - :param tables: The names of the Azure tables that the workspace should - read - :type tables: list[str] - :param storage_account: Required. The storage account connection details - :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount - :ivar status: The status of the storage insight - :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus - :param e_tag: The ETag of the storage insight. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'containers': {'key': 'properties.containers', 'type': '[str]'}, - 'tables': {'key': 'properties.tables', 'type': '[str]'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, - 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, storage_account, tags=None, containers=None, tables=None, e_tag: str=None, **kwargs) -> None: - super(StorageInsight, self).__init__(tags=tags, **kwargs) - self.containers = containers - self.tables = tables - self.storage_account = storage_account - self.status = None - self.e_tag = e_tag diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py deleted file mode 100644 index 06af6f749f74..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class StorageInsightStatus(Model): - """The status of the storage insight. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. The state of the storage insight connection to the - workspace. Possible values include: 'OK', 'ERROR' - :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState - :param description: Description of the state of the storage insight. - :type description: str - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageInsightStatus, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.description = kwargs.get('description', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py deleted file mode 100644 index b30d58481193..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class StorageInsightStatus(Model): - """The status of the storage insight. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. The state of the storage insight connection to the - workspace. Possible values include: 'OK', 'ERROR' - :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState - :param description: Description of the state of the storage insight. - :type description: str - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, state, description: str=None, **kwargs) -> None: - super(StorageInsightStatus, self).__init__(**kwargs) - self.state = state - self.description = description diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py deleted file mode 100644 index 416b195fd329..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class Tag(Model): - """A tag of a saved search. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The tag name. - :type name: str - :param value: Required. The tag value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Tag, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py deleted file mode 100644 index cf70eba079bb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class Tag(Model): - """A tag of a saved search. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The tag name. - :type name: str - :param value: Required. The tag value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(Tag, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py deleted file mode 100644 index 816554809aba..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 msrest.serialization import Model - - -class UsageMetric(Model): - """A metric describing the usage of a resource. - - :param name: The name of the metric. - :type name: ~azure.mgmt.loganalytics.models.MetricName - :param unit: The units used for the metric. - :type unit: str - :param current_value: The current value of the metric. - :type current_value: float - :param limit: The quota limit for the metric. - :type limit: float - :param next_reset_time: The time that the metric's value will reset. - :type next_reset_time: datetime - :param quota_period: The quota period that determines the length of time - between value resets. - :type quota_period: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageMetric, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.unit = kwargs.get('unit', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.next_reset_time = kwargs.get('next_reset_time', None) - self.quota_period = kwargs.get('quota_period', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py deleted file mode 100644 index 7b7714ec814f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class UsageMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`UsageMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(UsageMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py deleted file mode 100644 index bb30a63af48e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 msrest.serialization import Model - - -class UsageMetric(Model): - """A metric describing the usage of a resource. - - :param name: The name of the metric. - :type name: ~azure.mgmt.loganalytics.models.MetricName - :param unit: The units used for the metric. - :type unit: str - :param current_value: The current value of the metric. - :type current_value: float - :param limit: The quota limit for the metric. - :type limit: float - :param next_reset_time: The time that the metric's value will reset. - :type next_reset_time: datetime - :param quota_period: The quota period that determines the length of time - between value resets. - :type quota_period: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - } - - def __init__(self, *, name=None, unit: str=None, current_value: float=None, limit: float=None, next_reset_time=None, quota_period: str=None, **kwargs) -> None: - super(UsageMetric, self).__init__(**kwargs) - self.name = name - self.unit = unit - self.current_value = current_value - self.limit = limit - self.next_reset_time = next_reset_time - self.quota_period = quota_period diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py deleted file mode 100644 index 1fc5acd6142e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 .resource import Resource - - -class Workspace(Resource): - """The top level Workspace resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the workspace. - Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' - :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus - :param source: The source of the workspace. Source defines where the - workspace was created. 'Azure' implies it was created in Azure. - 'External' implies it was created via the Operational Insights Portal. - This value is set on the service side and read-only on the client side. - :type source: str - :param customer_id: The ID associated with the workspace. Setting this - value at creation time allows the workspace being created to be linked to - an existing workspace. - :type customer_id: str - :param portal_url: The URL of the Operational Insights portal for this - workspace. This value is set on the service side and read-only on the - client side. - :type portal_url: str - :param sku: The SKU of the workspace. - :type sku: ~azure.mgmt.loganalytics.models.Sku - :param retention_in_days: The workspace data retention in days. -1 means - Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed - for all other Skus. - :type retention_in_days: int - :param e_tag: The ETag of the workspace. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': -1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Workspace, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.source = kwargs.get('source', None) - self.customer_id = kwargs.get('customer_id', None) - self.portal_url = kwargs.get('portal_url', None) - self.sku = kwargs.get('sku', None) - self.retention_in_days = kwargs.get('retention_in_days', None) - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py deleted file mode 100644 index f37caf804c88..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class WorkspacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Workspace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workspace]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py deleted file mode 100644 index 8b5c2ccb6aa9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeBody(Model): - """Describes the body of a purge request for an App Insights Workspace. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeBody, self).__init__(**kwargs) - self.table = kwargs.get('table', None) - self.filters = kwargs.get('filters', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py deleted file mode 100644 index 0a9672178f6a..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) - self.column = kwargs.get('column', None) - self.operator = kwargs.get('operator', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py deleted file mode 100644 index e5813d8d8c71..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, *, column: str=None, operator: str=None, value=None, **kwargs) -> None: - super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) - self.column = column - self.operator = operator - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py deleted file mode 100644 index 5112daee22c5..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeBody(Model): - """Describes the body of a purge request for an App Insights Workspace. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, - } - - def __init__(self, *, table: str, filters, **kwargs) -> None: - super(WorkspacePurgeBody, self).__init__(**kwargs) - self.table = table - self.filters = filters diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py deleted file mode 100644 index 35d54f2167a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeResponse, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py deleted file mode 100644 index 26f7fbc448ae..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, *, operation_id: str, **kwargs) -> None: - super(WorkspacePurgeResponse, self).__init__(**kwargs) - self.operation_id = operation_id diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py deleted file mode 100644 index 52216b115125..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'Pending', 'Completed' - :type status: str or ~azure.mgmt.loganalytics.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py deleted file mode 100644 index 09c2dcb4410f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class WorkspacePurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'Pending', 'Completed' - :type status: str or ~azure.mgmt.loganalytics.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status, **kwargs) -> None: - super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) - self.status = status diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py deleted file mode 100644 index 6c9f42e6d975..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 .resource_py3 import Resource - - -class Workspace(Resource): - """The top level Workspace resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the workspace. - Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' - :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus - :param source: The source of the workspace. Source defines where the - workspace was created. 'Azure' implies it was created in Azure. - 'External' implies it was created via the Operational Insights Portal. - This value is set on the service side and read-only on the client side. - :type source: str - :param customer_id: The ID associated with the workspace. Setting this - value at creation time allows the workspace being created to be linked to - an existing workspace. - :type customer_id: str - :param portal_url: The URL of the Operational Insights portal for this - workspace. This value is set on the service side and read-only on the - client side. - :type portal_url: str - :param sku: The SKU of the workspace. - :type sku: ~azure.mgmt.loganalytics.models.Sku - :param retention_in_days: The workspace data retention in days. -1 means - Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed - for all other Skus. - :type retention_in_days: int - :param e_tag: The ETag of the workspace. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': -1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, provisioning_state=None, source: str=None, customer_id: str=None, portal_url: str=None, sku=None, retention_in_days: int=None, e_tag: str=None, **kwargs) -> None: - super(Workspace, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.source = source - self.customer_id = customer_id - self.portal_url = portal_url - self.sku = sku - self.retention_in_days = retention_in_days - self.e_tag = e_tag diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py index c5ba8a2e6ecf..c13b14cf3be5 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py @@ -9,18 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- -from .storage_insights_operations import StorageInsightsOperations -from .workspaces_operations import WorkspacesOperations -from .saved_searches_operations import SavedSearchesOperations -from .linked_services_operations import LinkedServicesOperations -from .data_sources_operations import DataSourcesOperations -from .operations import Operations +from ._data_exports_operations import DataExportsOperations +from ._data_sources_operations import DataSourcesOperations +from ._workspaces_operations import WorkspacesOperations +from ._linked_services_operations import LinkedServicesOperations +from ._linked_storage_accounts_operations import LinkedStorageAccountsOperations +from ._operations import Operations +from ._clusters_operations import ClustersOperations +from ._storage_insights_operations import StorageInsightsOperations +from ._saved_searches_operations import SavedSearchesOperations +from ._operational_insights_management_client_operations import OperationalInsightsManagementClientOperationsMixin __all__ = [ - 'StorageInsightsOperations', + 'DataExportsOperations', + 'DataSourcesOperations', 'WorkspacesOperations', - 'SavedSearchesOperations', 'LinkedServicesOperations', - 'DataSourcesOperations', + 'LinkedStorageAccountsOperations', 'Operations', + 'ClustersOperations', + 'StorageInsightsOperations', + 'SavedSearchesOperations', + 'OperationalInsightsManagementClientOperationsMixin', ] diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py new file mode 100644 index 000000000000..1dd6910a94fb --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py @@ -0,0 +1,460 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ClustersOperations(object): + """ClustersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets Log Analytics clusters in a resource group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Cluster + :rtype: + ~azure.mgmt.loganalytics.models.ClusterPaged[~azure.mgmt.loganalytics.models.Cluster] + :raises: + :class:`ClusterErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the Log Analytics clusters in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Cluster + :rtype: + ~azure.mgmt.loganalytics.models.ClusterPaged[~azure.mgmt.loganalytics.models.Cluster] + :raises: + :class:`ClusterErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters'} + + + def _create_or_update_initial( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Cluster') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + if response.status_code == 201: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a Log Analytics cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Log Analytics cluster. + :type cluster_name: str + :param parameters: The parameters required to create or update a Log + Analytics cluster. + :type parameters: ~azure.mgmt.loganalytics.models.Cluster + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Cluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.Cluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.Cluster]] + :raises: + :class:`ClusterErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} + + def delete( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Deletes a cluster instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: Name of the Log Analytics Cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ClusterErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} + + def get( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Gets a Log Analytics cluster instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: Name of the Log Analytics Cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Cluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Cluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ClusterErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} + + def update( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a Log Analytics cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: Name of the Log Analytics Cluster. + :type cluster_name: str + :param parameters: The parameters required to patch a Log Analytics + cluster. + :type parameters: ~azure.mgmt.loganalytics.models.ClusterPatch + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Cluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Cluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ClusterErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ClusterPatch') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ClusterErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py new file mode 100644 index 000000000000..7c0b1e673a16 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py @@ -0,0 +1,340 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DataExportsOperations(object): + """DataExportsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Lists the data export instances within a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DataExport + :rtype: + ~azure.mgmt.loganalytics.models.DataExportPaged[~azure.mgmt.loganalytics.models.DataExport] + :raises: + :class:`DataExportErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataExportErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataExportPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, data_export_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataExportName': self._serialize.url("data_export_name", data_export_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DataExport') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DataExportErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DataExport', response) + if response.status_code == 201: + deserialized = self._deserialize('DataExport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, data_export_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a data export. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_export_name: The data export rule name. + :type data_export_name: str + :param parameters: The parameters required to create or update a data + export. + :type parameters: ~azure.mgmt.loganalytics.models.DataExport + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DataExport or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.DataExport] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.DataExport]] + :raises: + :class:`DataExportErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + data_export_name=data_export_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DataExport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'} + + def get( + self, resource_group_name, workspace_name, data_export_name, custom_headers=None, raw=False, **operation_config): + """Gets a data export instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_export_name: The data export rule name. + :type data_export_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataExport or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.DataExport or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DataExportErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataExportName': self._serialize.url("data_export_name", data_export_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DataExportErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataExport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'} + + def delete( + self, resource_group_name, workspace_name, data_export_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified data export in a given workspace.. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_export_name: The data export rule name. + :type data_export_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DataExportErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataExportName': self._serialize.url("data_export_name", data_export_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DataExportErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py similarity index 82% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py index 24b70947dd5b..e508087c4873 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py @@ -19,11 +19,13 @@ class DataSourcesOperations(object): """DataSourcesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-11-01-preview" + self.api_version = "2020-03-01-preview" self.config = config @@ -41,11 +43,10 @@ def create_or_update( self, resource_group_name, workspace_name, data_source_name, parameters, custom_headers=None, raw=False, **operation_config): """Create or update a data source. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that will - contain the datasource + :param workspace_name: The name of the workspace. :type workspace_name: str :param data_source_name: The name of the datasource resource. :type data_source_name: str @@ -66,18 +67,19 @@ def create_or_update( url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -90,9 +92,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'DataSource') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -100,7 +101,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataSource', response) if response.status_code == 201: @@ -117,11 +117,10 @@ def delete( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): """Deletes a data source instance. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that - contains the datasource. + :param workspace_name: The name of the workspace. :type workspace_name: str :param data_source_name: Name of the datasource. :type data_source_name: str @@ -138,19 +137,18 @@ def delete( url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -159,8 +157,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -176,11 +174,10 @@ def get( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): """Gets a datasource instance. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that - contains the datasource. + :param workspace_name: The name of the workspace. :type workspace_name: str :param data_source_name: Name of the datasource :type data_source_name: str @@ -198,19 +195,19 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -219,8 +216,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -228,7 +225,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataSource', response) @@ -244,10 +240,10 @@ def list_by_workspace( """Gets the first page of data source instances in a workspace with the link to the next page. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: The workspace that contains the data sources. + :param workspace_name: The name of the workspace. :type workspace_name: str :param filter: The filter to apply on the operation. :type filter: str @@ -264,15 +260,14 @@ def list_by_workspace( ~azure.mgmt.loganalytics.models.DataSourcePaged[~azure.mgmt.loganalytics.models.DataSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -281,7 +276,7 @@ def internal_paging(next_link=None, raw=False): query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if skiptoken is not None: query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -289,7 +284,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -298,9 +293,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -310,12 +309,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py similarity index 80% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py index 397183f80a36..636b5a9441d5 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py @@ -19,11 +19,13 @@ class LinkedServicesOperations(object): """LinkedServicesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -33,27 +35,24 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-11-01-preview" + self.api_version = "2020-03-01-preview" self.config = config def create_or_update( - self, resource_group_name, workspace_name, linked_service_name, resource_id, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, linked_service_name, parameters, custom_headers=None, raw=False, **operation_config): """Create or update a linked service. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that will - contain the linkedServices resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param linked_service_name: Name of the linkedServices resource :type linked_service_name: str - :param resource_id: The resource id of the resource that will be - linked to the workspace. - :type resource_id: str - :param tags: Resource tags - :type tags: dict[str, str] + :param parameters: The parameters required to create or update a + linked service. + :type parameters: ~azure.mgmt.loganalytics.models.LinkedService :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -64,24 +63,23 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.LinkedService(tags=tags, resource_id=resource_id) - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -94,9 +92,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'LinkedService') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -104,7 +101,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LinkedService', response) if response.status_code == 201: @@ -121,11 +117,10 @@ def delete( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): """Deletes a linked service instance. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that - contains the linkedServices resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param linked_service_name: Name of the linked service. :type linked_service_name: str @@ -142,19 +137,18 @@ def delete( url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -163,8 +157,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -180,11 +174,10 @@ def get( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): """Gets a linked service instance. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that - contains the linkedServices resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param linked_service_name: Name of the linked service. :type linked_service_name: str @@ -202,19 +195,19 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -223,8 +216,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -232,7 +225,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LinkedService', response) @@ -247,11 +239,10 @@ def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets the linked services instances in a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace that - contains the linked services. + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -263,21 +254,20 @@ def list_by_workspace( ~azure.mgmt.loganalytics.models.LinkedServicePaged[~azure.mgmt.loganalytics.models.LinkedService] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -285,7 +275,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -294,9 +284,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -306,12 +300,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_storage_accounts_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_storage_accounts_operations.py new file mode 100644 index 000000000000..3fa6e6bac3b8 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_storage_accounts_operations.py @@ -0,0 +1,320 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LinkedStorageAccountsOperations(object): + """LinkedStorageAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, workspace_name, data_source_type, storage_account_ids=None, custom_headers=None, raw=False, **operation_config): + """Create or Update a link relation between current workspace and a group + of storage accounts of a specific data source type. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_source_type: Linked storage accounts type. Possible values + include: 'CustomLogs', 'AzureWatson' + :type data_source_type: str or + ~azure.mgmt.loganalytics.models.DataSourceType + :param storage_account_ids: Linked storage accounts resources ids. + :type storage_account_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LinkedStorageAccountsResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedStorageAccountsResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.LinkedStorageAccountsResource(storage_account_ids=storage_account_ids) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataSourceType': self._serialize.url("data_source_type", data_source_type, 'DataSourceType'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'LinkedStorageAccountsResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LinkedStorageAccountsResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}'} + + def delete( + self, resource_group_name, workspace_name, data_source_type, custom_headers=None, raw=False, **operation_config): + """Deletes all linked storage accounts of a specific data source type + associated with the specified workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_source_type: Linked storage accounts type. Possible values + include: 'CustomLogs', 'AzureWatson' + :type data_source_type: str or + ~azure.mgmt.loganalytics.models.DataSourceType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataSourceType': self._serialize.url("data_source_type", data_source_type, 'DataSourceType'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}'} + + def get( + self, resource_group_name, workspace_name, data_source_type, custom_headers=None, raw=False, **operation_config): + """Gets all linked storage account of a specific data source type + associated with the specified workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param data_source_type: Linked storage accounts type. Possible values + include: 'CustomLogs', 'AzureWatson' + :type data_source_type: str or + ~azure.mgmt.loganalytics.models.DataSourceType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LinkedStorageAccountsResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedStorageAccountsResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'dataSourceType': self._serialize.url("data_source_type", data_source_type, 'DataSourceType'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LinkedStorageAccountsResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}'} + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets all linked storage accounts associated with the specified + workspace, storage accounts will be sorted by their data source type. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LinkedStorageAccountsResource + :rtype: + ~azure.mgmt.loganalytics.models.LinkedStorageAccountsResourcePaged[~azure.mgmt.loganalytics.models.LinkedStorageAccountsResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LinkedStorageAccountsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py new file mode 100644 index 000000000000..2b18f5d5f66d --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py @@ -0,0 +1,81 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class OperationalInsightsManagementClientOperationsMixin(object): + + def get_async_operations_status( + self, location, async_operation_id, custom_headers=None, raw=False, **operation_config): + """Get the status of a long running azure asynchronous operation. + + :param location: The region name of operation. + :type location: str + :param async_operation_id: The operation Id. + :type async_operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_async_operations_status.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'asyncOperationId': self._serialize.url("async_operation_id", async_operation_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_async_operations_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py similarity index 79% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py index 42e218c978a0..0b08e6613b8c 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-11-01-preview" + self.api_version = "2020-03-01-preview" self.config = config @@ -51,15 +53,14 @@ def list( ~azure.mgmt.loganalytics.models.OperationPaged[~azure.mgmt.loganalytics.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -88,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.OperationalInsights/operations'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_saved_searches_operations.py similarity index 64% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_saved_searches_operations.py index 95bbe17347cb..94b0bec211a5 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_saved_searches_operations.py @@ -19,11 +19,13 @@ class SavedSearchesOperations(object): """SavedSearchesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-03-20". + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -33,21 +35,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-20" + self.api_version = "2020-03-01-preview" self.config = config def delete( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, saved_search_id, custom_headers=None, raw=False, **operation_config): """Deletes the specified saved search in a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str - :param saved_search_name: Name of the saved search. - :type saved_search_name: str + :param saved_search_id: The id of the saved search. + :type saved_search_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -60,20 +62,19 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'savedSearchId': self._serialize.url("saved_search_id", saved_search_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -82,8 +83,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -93,19 +94,19 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'} def create_or_update( - self, resource_group_name, workspace_name, saved_search_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, saved_search_id, parameters, custom_headers=None, raw=False, **operation_config): """Creates or updates a saved search for a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str - :param saved_search_name: The id of the saved search. - :type saved_search_name: str + :param saved_search_id: The id of the saved search. + :type saved_search_id: str :param parameters: The parameters required to save a search. :type parameters: ~azure.mgmt.loganalytics.models.SavedSearch :param dict custom_headers: headers that will be added to the request @@ -121,19 +122,20 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'savedSearchId': self._serialize.url("saved_search_id", saved_search_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -146,9 +148,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'SavedSearch') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -156,7 +157,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SavedSearch', response) @@ -165,19 +165,19 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'} def get( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, saved_search_id, custom_headers=None, raw=False, **operation_config): """Gets the specified saved search for a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str - :param saved_search_name: The id of the saved search. - :type saved_search_name: str + :param saved_search_id: The id of the saved search. + :type saved_search_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -191,20 +191,20 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'savedSearchId': self._serialize.url("saved_search_id", saved_search_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -213,8 +213,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -222,7 +222,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SavedSearch', response) @@ -231,16 +230,16 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'} def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets the saved searches for a given Log Analytics Workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -256,18 +255,18 @@ def list_by_workspace( url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -276,8 +275,8 @@ def list_by_workspace( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -285,7 +284,6 @@ def list_by_workspace( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SavedSearchesListResult', response) @@ -295,69 +293,3 @@ def list_by_workspace( return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches'} - - def get_results( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): - """Gets the results from a saved search for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The name of the saved search. - :type saved_search_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SearchResultsResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py similarity index 82% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py index 3cd3adc2ed36..903d10c6981b 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py @@ -19,11 +19,13 @@ class StorageInsightsOperations(object): """StorageInsightsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-03-20". + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-20" + self.api_version = "2020-03-01-preview" self.config = config @@ -41,11 +43,10 @@ def create_or_update( self, resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers=None, raw=False, **operation_config): """Create or update a storage insight. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param storage_insight_name: Name of the storageInsightsConfigs resource @@ -67,18 +68,19 @@ def create_or_update( url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -91,9 +93,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'StorageInsight') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -101,7 +102,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('StorageInsight', response) if response.status_code == 201: @@ -118,11 +118,10 @@ def get( self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): """Gets a storage insight instance. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param storage_insight_name: Name of the storageInsightsConfigs resource @@ -141,19 +140,19 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -162,8 +161,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -171,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('StorageInsight', response) @@ -186,11 +184,10 @@ def delete( self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): """Deletes a storageInsightsConfigs resource. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param storage_insight_name: Name of the storageInsightsConfigs resource @@ -208,19 +205,18 @@ def delete( url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -229,8 +225,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -246,11 +242,10 @@ def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Lists the storage insight instances within a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -262,21 +257,20 @@ def list_by_workspace( ~azure.mgmt.loganalytics.models.StorageInsightPaged[~azure.mgmt.loganalytics.models.StorageInsight] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_workspace.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -284,7 +278,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -293,9 +287,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -305,12 +303,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py similarity index 58% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py index 50f97070acc1..27477b7d99ae 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py @@ -21,10 +21,13 @@ class WorkspacesOperations(object): """WorkspacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". """ models = models @@ -34,428 +37,18 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2020-03-01-preview" self.config = config - def list_link_targets( - self, custom_headers=None, raw=False, **operation_config): - """Get a list of workspaces which the current user has administrator - privileges and are not associated with an Azure Subscription. The - subscriptionId parameter in the Url is ignored. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.loganalytics.models.LinkTarget] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.list_link_targets.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[LinkTarget]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_link_targets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets'} - - def get_schema( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the schema for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SearchGetSchemaResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchGetSchemaResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.get_schema.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchGetSchemaResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema'} - - - def _get_search_results_initial( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-03-20" - - # Construct URL - url = self.get_search_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def get_search_results( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Submit a search for a given workspace. The response will contain an id - to track the search. User can use the id to poll the search status and - get the full search result later if the search takes long time to - finish. . - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param parameters: The parameters required to execute a search query. - :type parameters: ~azure.mgmt.loganalytics.models.SearchParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SearchResultsResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.SearchResultsResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.SearchResultsResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._get_search_results_initial( - resource_group_name=resource_group_name, - workspace_name=workspace_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - get_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search'} - - def update_search_results( - self, resource_group_name, workspace_name, id, custom_headers=None, raw=False, **operation_config): - """Gets updated search results for a given search query. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param id: The id of the search that will have results updated. You - can get the id from the response of the GetResults call. - :type id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SearchResultsResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.update_search_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'id': self._serialize.url("id", id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}'} - - - def _purge_initial( - self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, **operation_config): - body = models.WorkspacePurgeBody(table=table, filters=filters) - - api_version = "2015-03-20" - - # Construct URL - url = self.purge.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'WorkspacePurgeBody') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkspacePurgeStatusResponse', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkspacePurgeResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def purge( - self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, polling=True, **operation_config): - """Purges data in an Log Analytics workspace by a set of user-defined - filters. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param table: Table from which to purge data. - :type table: str - :param filters: The set of columns and filters (queries) to run over - them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: :class:`CloudError` - """ - raw_result = self._purge_initial( - resource_group_name=resource_group_name, - workspace_name=workspace_name, - table=table, - filters=filters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'} - def disable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): """Disables an intelligence pack for a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. + :param workspace_name: The name of the workspace. :type workspace_name: str :param intelligence_pack_name: The name of the intelligence pack to be disabled. @@ -469,25 +62,22 @@ def disable_intelligence_pack( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.disable_intelligence_pack.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -496,8 +86,8 @@ def disable_intelligence_pack( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -513,10 +103,10 @@ def enable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): """Enables an intelligence pack for a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. + :param workspace_name: The name of the workspace. :type workspace_name: str :param intelligence_pack_name: The name of the intelligence pack to be enabled. @@ -530,25 +120,22 @@ def enable_intelligence_pack( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.enable_intelligence_pack.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -557,8 +144,8 @@ def enable_intelligence_pack( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -575,10 +162,10 @@ def list_intelligence_packs( """Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -590,24 +177,22 @@ def list_intelligence_packs( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.list_intelligence_packs.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -616,8 +201,8 @@ def list_intelligence_packs( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -625,7 +210,6 @@ def list_intelligence_packs( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('[IntelligencePack]', response) @@ -636,14 +220,87 @@ def list_intelligence_packs( return deserialized list_intelligence_packs.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks'} + def list_management_groups( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of management groups connected to a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagementGroup + :rtype: + ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_management_groups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} + def get_shared_keys( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets the shared keys for a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -655,24 +312,22 @@ def get_shared_keys( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.get_shared_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -681,8 +336,8 @@ def get_shared_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -690,7 +345,6 @@ def get_shared_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedKeys', response) @@ -705,8 +359,8 @@ def list_usages( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets a list of usage metrics for a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str @@ -720,23 +374,20 @@ def list_usages( ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -744,7 +395,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -753,83 +404,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.get(url, query_parameters, header_parameters) + return request - return response + def internal_paging(next_link=None): + request = prepare_request(next_link) - # Deserialize response - deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} - - def list_management_groups( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of management groups connected to a workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagementGroup - :rtype: - ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] - :raises: :class:`CloudError` - """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_management_groups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -839,22 +420,20 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets workspaces in a resource group. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -866,22 +445,19 @@ def list_by_resource_group( ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -889,7 +465,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -898,9 +474,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -910,12 +490,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces'} @@ -934,21 +512,18 @@ def list( ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -956,7 +531,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -965,9 +540,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -977,12 +556,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} @@ -990,23 +567,22 @@ def internal_paging(next_link=None, raw=False): def _create_or_update_initial( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-11-01-preview" - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -1019,11 +595,10 @@ def _create_or_update_initial( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -1092,41 +667,24 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} - def delete( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Deletes a workspace instance. - - :param resource_group_name: The resource group name of the workspace. - :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-11-01-preview" + def _delete_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -1135,10 +693,10 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -1146,6 +704,46 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a workspace instance. + + :param resource_group_name: The resource group name of the workspace. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} def get( @@ -1154,7 +752,7 @@ def get( :param resource_group_name: The resource group name of the workspace. :type resource_group_name: str - :param workspace_name: Name of the Log Analytics Workspace. + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1166,24 +764,22 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -1192,8 +788,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1201,7 +797,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Workspace', response) @@ -1221,7 +816,7 @@ def update( :param workspace_name: The name of the workspace. :type workspace_name: str :param parameters: The parameters required to patch a workspace. - :type parameters: ~azure.mgmt.loganalytics.models.Workspace + :type parameters: ~azure.mgmt.loganalytics.models.WorkspacePatch :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1232,23 +827,22 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -1258,12 +852,11 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'Workspace') + body_content = self._serialize.body(parameters, 'WorkspacePatch') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1271,7 +864,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Workspace', response) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/CHANGELOG.md b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/CHANGELOG.md index 27e40e5cfdd8..c2f9f315bfe6 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/CHANGELOG.md +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/CHANGELOG.md @@ -2,4 +2,4 @@ ## 0.1.0 (2020-01-24) -* Initial Release \ No newline at end of file +* Initial Release