From 40dccc01c3d84981f62ae346be11ab14db9709c7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 10 Jun 2019 18:51:19 +0000 Subject: [PATCH 1/2] Generated from 625784cb5a87434e4909cd1e9303ad2116421950 fix: example CI and whitespace --- .../models/component_purge_body_filters.py | 3 +- .../component_purge_body_filters_py3.py | 3 +- .../azure/mgmt/loganalytics/__init__.py | 4 +- .../mgmt/loganalytics/models/__init__.py | 93 +-- .../mgmt/loganalytics/models/core_summary.py | 39 -- .../loganalytics/models/core_summary_py3.py | 39 -- .../mgmt/loganalytics/models/link_target.py | 40 -- .../loganalytics/models/link_target_py3.py | 40 -- ...ional_insights_management_client_enums.py} | 19 - .../mgmt/loganalytics/models/saved_search.py | 80 --- .../loganalytics/models/saved_search_py3.py | 80 --- .../models/saved_searches_list_result.py | 32 -- .../models/saved_searches_list_result_py3.py | 32 -- .../mgmt/loganalytics/models/search_error.py | 32 -- .../loganalytics/models/search_error_py3.py | 32 -- .../models/search_get_schema_response.py | 32 -- .../models/search_get_schema_response_py3.py | 32 -- .../loganalytics/models/search_highlight.py | 32 -- .../models/search_highlight_py3.py | 32 -- .../loganalytics/models/search_metadata.py | 92 --- .../models/search_metadata_py3.py | 92 --- .../models/search_metadata_schema.py | 32 -- .../models/search_metadata_schema_py3.py | 32 -- .../loganalytics/models/search_parameters.py | 52 -- .../models/search_parameters_py3.py | 52 -- .../models/search_results_response.py | 47 -- .../models/search_results_response_py3.py | 47 -- .../models/search_schema_value.py | 63 --- .../models/search_schema_value_py3.py | 63 --- .../mgmt/loganalytics/models/search_sort.py | 33 -- .../loganalytics/models/search_sort_py3.py | 33 -- .../azure/mgmt/loganalytics/models/sku.py | 3 +- .../azure/mgmt/loganalytics/models/sku_py3.py | 3 +- .../loganalytics/models/storage_account.py | 40 -- .../models/storage_account_py3.py | 40 -- .../loganalytics/models/storage_insight.py | 71 --- .../models/storage_insight_paged.py | 27 - .../models/storage_insight_py3.py | 71 --- .../models/storage_insight_status.py | 39 -- .../models/storage_insight_status_py3.py | 39 -- .../azure/mgmt/loganalytics/models/tag.py | 39 -- .../azure/mgmt/loganalytics/models/tag_py3.py | 39 -- .../models/workspace_purge_body.py | 41 -- .../models/workspace_purge_body_filters.py | 40 -- .../workspace_purge_body_filters_py3.py | 40 -- .../models/workspace_purge_body_py3.py | 41 -- .../models/workspace_purge_response.py | 35 -- .../models/workspace_purge_response_py3.py | 35 -- .../models/workspace_purge_status_response.py | 35 -- .../workspace_purge_status_response_py3.py | 35 -- ...operational_insights_management_client.py} | 37 +- .../mgmt/loganalytics/operations/__init__.py | 8 +- .../operations/data_sources_operations.py | 24 +- .../operations/linked_services_operations.py | 24 +- .../loganalytics/operations/operations.py | 7 +- .../operations/saved_searches_operations.py | 363 ------------ .../operations/storage_insights_operations.py | 316 ----------- .../operations/workspaces_operations.py | 534 ++---------------- .../azure/mgmt/loganalytics/version.py | 2 +- 59 files changed, 108 insertions(+), 3254 deletions(-) delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py rename sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/{log_analytics_management_client_enums.py => operational_insights_management_client_enums.py} (86%) delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py rename sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/{log_analytics_management_client.py => operational_insights_management_client.py} (75%) delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py delete mode 100644 sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py index 09948ccd3907..a79d73f55d46 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py @@ -19,7 +19,8 @@ class ComponentPurgeBodyFilters(Model): run :type column: str :param operator: A query operator to evaluate over the provided column and - value(s). + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. :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 diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py index 9da4c4eb8e6b..9a079b753f96 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py @@ -19,7 +19,8 @@ class ComponentPurgeBodyFilters(Model): run :type column: str :param operator: A query operator to evaluate over the provided column and - value(s). + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. :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 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..acf344a86746 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,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .log_analytics_management_client import LogAnalyticsManagementClient +from .operational_insights_management_client import OperationalInsightsManagementClient from .version import VERSION -__all__ = ['LogAnalyticsManagementClient'] +__all__ = ['OperationalInsightsManagementClient'] __version__ = VERSION 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..1090115d9be7 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,29 +10,6 @@ # -------------------------------------------------------------------------- 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 @@ -45,30 +22,9 @@ from .management_group_py3 import ManagementGroup from .sku_py3 import Sku from .workspace_py3 import Workspace + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource 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 @@ -81,46 +37,21 @@ from .management_group import ManagementGroup from .sku import Sku from .workspace import Workspace -from .storage_insight_paged import StorageInsightPaged + from .resource import Resource + from .proxy_resource import ProxyResource +from .linked_service_paged import LinkedServicePaged +from .data_source_paged import DataSourcePaged 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 .operational_insights_management_client_enums import ( DataSourceKind, SkuNameEnum, EntityStatus, ) __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', @@ -133,16 +64,14 @@ 'ManagementGroup', 'Sku', 'Workspace', - 'StorageInsightPaged', + 'Resource', + 'ProxyResource', + 'LinkedServicePaged', + 'DataSourcePaged', 'UsageMetricPaged', 'ManagementGroupPaged', 'WorkspacePaged', - 'LinkedServicePaged', - 'DataSourcePaged', 'OperationPaged', - 'SearchSortEnum', - 'StorageInsightState', - 'PurgeState', 'DataSourceKind', 'SkuNameEnum', 'EntityStatus', 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/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/log_analytics_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operational_insights_management_client_enums.py similarity index 86% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operational_insights_management_client_enums.py index 22641d5bc333..2e5fba5de75d 100644 --- 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/operational_insights_management_client_enums.py @@ -12,24 +12,6 @@ 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" @@ -54,7 +36,6 @@ class SkuNameEnum(str, Enum): free = "Free" standard = "Standard" premium = "Premium" - unlimited = "Unlimited" per_node = "PerNode" per_gb2018 = "PerGB2018" standalone = "Standalone" 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/sku.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py index 73f09793dec9..2503a0c4acd4 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py @@ -18,8 +18,7 @@ class Sku(Model): 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' + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone' :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum """ 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 index 41a0c3d4b36b..20809cd9e380 100644 --- 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 @@ -18,8 +18,7 @@ class Sku(Model): 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' + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone' :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum """ 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/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/log_analytics_management_client.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operational_insights_management_client.py similarity index 75% 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..3d8f7dd9cb3b 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 @@ -13,17 +13,15 @@ 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.workspaces_operations import WorkspacesOperations from .operations.operations import Operations from . import models -class LogAnalyticsManagementClientConfiguration(AzureConfiguration): - """Configuration for LogAnalyticsManagementClient +class OperationalInsightsManagementClientConfiguration(AzureConfiguration): + """Configuration for OperationalInsightsManagementClient Note that all parameters used to create this instance are saved as instance attributes. @@ -47,7 +45,7 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' - super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url) + super(OperationalInsightsManagementClientConfiguration, self).__init__(base_url) self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') @@ -56,22 +54,18 @@ def __init__( self.subscription_id = subscription_id -class LogAnalyticsManagementClient(SDKClient): - """The Log Analytics Client. +class OperationalInsightsManagementClient(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 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 workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.loganalytics.operations.Operations @@ -88,22 +82,19 @@ 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 = '2015-11-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.storage_insights = StorageInsightsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workspaces = WorkspacesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.saved_searches = SavedSearchesOperations( - 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._client, self.config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) 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..876704345f4f 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,14 @@ # 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 .workspaces_operations import WorkspacesOperations from .operations import Operations __all__ = [ - 'StorageInsightsOperations', - 'WorkspacesOperations', - 'SavedSearchesOperations', 'LinkedServicesOperations', 'DataSourcesOperations', + 'WorkspacesOperations', 'Operations', ] 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 index 24b70947dd5b..b4ca9da728fd 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 @@ -78,6 +78,7 @@ def create_or_update( # 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 +91,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) @@ -150,7 +150,6 @@ def delete( # 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 +158,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) @@ -210,7 +209,7 @@ def get( # 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 +218,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) @@ -289,7 +288,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 +297,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 index 397183f80a36..da7e34925988 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 @@ -82,6 +82,7 @@ def create_or_update( # 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 +95,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) @@ -154,7 +154,6 @@ def delete( # 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 +162,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) @@ -214,7 +213,7 @@ def get( # 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 +222,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) @@ -285,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: @@ -294,9 +293,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 index 42e218c978a0..6191e47425ce 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 @@ -67,7 +67,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 +76,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 deleted file mode 100644 index 95bbe17347cb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py +++ /dev/null @@ -1,363 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class SavedSearchesOperations(object): - """SavedSearchesOperations operations. - - :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". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-03-20" - - self.config = config - - def delete( - self, resource_group_name, workspace_name, saved_search_name, 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. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: 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: 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'), - '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.delete(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 - - 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}'} - - def create_or_update( - self, resource_group_name, workspace_name, saved_search_name, 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. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The id of the saved search. - :type saved_search_name: 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 - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SavedSearch or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - '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 body - 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) - - 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('SavedSearch', 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}/savedSearches/{savedSearchName}'} - - def get( - self, resource_group_name, workspace_name, saved_search_name, 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. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The id 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: SavedSearch or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearch 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'), - '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('SavedSearch', 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}/savedSearches/{savedSearchName}'} - - 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. - :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: SavedSearchesListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearchesListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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') - } - 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('SavedSearchesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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 deleted file mode 100644 index 3cd3adc2ed36..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py +++ /dev/null @@ -1,316 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class StorageInsightsOperations(object): - """StorageInsightsOperations operations. - - :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". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-03-20" - - self.config = config - - 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. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_name: str - :param parameters: The parameters required to create or update a - storage insight. - :type parameters: ~azure.mgmt.loganalytics.models.StorageInsight - :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: StorageInsight or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_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 body - 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) - - if response.status_code not in [200, 201]: - 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('StorageInsight', response) - if response.status_code == 201: - deserialized = self._deserialize('StorageInsight', 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}/storageInsightConfigs/{storageInsightName}'} - - 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. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_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: StorageInsight or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.StorageInsight 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'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_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('StorageInsight', 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}/storageInsightConfigs/{storageInsightName}'} - - 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. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_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` - """ - # 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'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_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.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - 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}/storageInsightConfigs/{storageInsightName}'} - - 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. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource - :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 StorageInsight - :rtype: - ~azure.mgmt.loganalytics.models.StorageInsightPaged[~azure.mgmt.loganalytics.models.StorageInsight] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - 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') - } - 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') - - 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) - - 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 - deserialized = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - 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 index 50f97070acc1..123496359167 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 @@ -25,6 +25,7 @@ class WorkspacesOperations(object): :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". """ models = models @@ -34,420 +35,10 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2015-11-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. @@ -469,8 +60,6 @@ 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 = { @@ -483,11 +72,10 @@ def disable_intelligence_pack( # 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') # 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 +84,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) @@ -530,8 +118,6 @@ 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 = { @@ -544,11 +130,10 @@ def enable_intelligence_pack( # 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') # 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 +142,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) @@ -590,8 +175,6 @@ 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 = { @@ -603,11 +186,11 @@ def list_intelligence_packs( # 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') # 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 +199,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) @@ -655,8 +238,6 @@ 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 = { @@ -668,11 +249,11 @@ def get_shared_keys( # 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') # 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 +262,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) @@ -720,8 +301,6 @@ 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): if not next_link: @@ -736,7 +315,7 @@ def internal_paging(next_link=None, raw=False): # 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') else: url = next_link @@ -744,7 +323,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,9 +332,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -794,8 +372,6 @@ def list_management_groups( ~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: @@ -810,7 +386,7 @@ def internal_paging(next_link=None, raw=False): # 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') else: url = next_link @@ -818,7 +394,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: @@ -827,9 +403,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -866,8 +441,6 @@ 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): if not next_link: @@ -881,7 +454,7 @@ def internal_paging(next_link=None, raw=False): # 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') else: url = next_link @@ -889,7 +462,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 +471,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -934,8 +506,6 @@ 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): if not next_link: @@ -948,7 +518,7 @@ def internal_paging(next_link=None, raw=False): # 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') else: url = next_link @@ -956,7 +526,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 +535,8 @@ 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) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -990,8 +559,6 @@ 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 = { @@ -1003,10 +570,11 @@ def _create_or_update_initial( # 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') # 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,9 +587,8 @@ 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]: exp = CloudError(response) @@ -1109,8 +676,6 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -1122,11 +687,10 @@ def delete( # 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') # 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,8 +699,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) @@ -1166,8 +730,6 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -1179,11 +741,11 @@ def get( # 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') # 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 +754,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) @@ -1232,8 +794,6 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -1245,10 +805,11 @@ def update( # 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') # 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()) @@ -1261,9 +822,8 @@ def update( body_content = self._serialize.body(parameters, 'Workspace') # 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) 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..d5ac4dd14e3f 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 = "2015-11-01-preview" From c07d5333b61552b64dcbd39452394d31585599dc Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 10 Jun 2019 18:54:05 +0000 Subject: [PATCH 2/2] Packaging update of azure-mgmt-loganalytics --- .../azure-mgmt-loganalytics/MANIFEST.in | 4 ++++ .../azure-mgmt-loganalytics/README.rst | 19 ------------------- .../azure-mgmt-loganalytics/setup.py | 1 + 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in b/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in +++ b/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/README.rst b/sdk/loganalytics/azure-mgmt-loganalytics/README.rst index b5a30d4f7307..45beb2b8c465 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/README.rst +++ b/sdk/loganalytics/azure-mgmt-loganalytics/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/setup.py b/sdk/loganalytics/azure-mgmt-loganalytics/setup.py index 1b9006391b22..b2a7e9191233 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/setup.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com',