diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_metadata.json b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_metadata.json new file mode 100644 index 000000000000..9c90772d0481 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_metadata.json @@ -0,0 +1,80 @@ +{ + "chosen_version": "2020-08-01", + "total_api_version_list": ["2020-08-01"], + "client": { + "name": "LogAnalyticsManagementClient", + "filename": "_log_analytics_management_client", + "description": "Operational Insights Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + "data_exports": "DataExportsOperations", + "data_sources": "DataSourcesOperations", + "intelligence_packs": "IntelligencePacksOperations", + "linked_services": "LinkedServicesOperations", + "linked_storage_accounts": "LinkedStorageAccountsOperations", + "management_groups": "ManagementGroupsOperations", + "operations": "Operations", + "operation_statuses": "OperationStatusesOperations", + "shared_keys": "SharedKeysOperations", + "usages": "UsagesOperations", + "workspaces": "WorkspacesOperations", + "deleted_workspaces": "DeletedWorkspacesOperations", + "clusters": "ClustersOperations", + "storage_insight_configs": "StorageInsightConfigsOperations", + "saved_searches": "SavedSearchesOperations", + "available_service_tiers": "AvailableServiceTiersOperations", + "gateways": "GatewaysOperations", + "schema": "SchemaOperations", + "workspace_purge": "WorkspacePurgeOperations", + "tables": "TablesOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file 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 142a0420b39b..efe7276fe05f 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_version.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "7.0.0b1" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_clusters_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_clusters_operations.py index da69eb88980f..50aa9993b2aa 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_clusters_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_clusters_operations.py @@ -103,7 +103,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -170,7 +170,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -224,7 +224,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -348,7 +348,7 @@ async def _delete_initial( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -468,7 +468,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -535,7 +535,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py index 3a0ab65f899a..6efdf65d0029 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -243,7 +243,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataExport', pipeline_response) @@ -306,7 +306,7 @@ async def delete( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_deleted_workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_deleted_workspaces_operations.py index 4e25fc791331..92b165ffab23 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_deleted_workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_deleted_workspaces_operations.py @@ -97,8 +97,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -167,8 +168,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_tables_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_tables_operations.py index 76567933916b..7e41c26cd82e 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_tables_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_tables_operations.py @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Table', pipeline_response) @@ -239,7 +239,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Table', pipeline_response) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_workspaces_operations.py index f1a9ba33b9c0..089a2d7b3438 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_workspaces_operations.py @@ -99,8 +99,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -169,8 +170,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -222,7 +224,8 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -321,6 +324,7 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-08-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -339,6 +343,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -346,7 +351,8 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -473,7 +479,8 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workspace', pipeline_response) @@ -539,7 +546,8 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workspace', pipeline_response) 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 1864c22fa5aa..160235262de4 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,19 +10,17 @@ from ._models_py3 import AvailableServiceTier from ._models_py3 import AzureEntityResource from ._models_py3 import Cluster - from ._models_py3 import ClusterErrorResponse from ._models_py3 import ClusterListResult from ._models_py3 import ClusterPatch from ._models_py3 import ClusterSku from ._models_py3 import CoreSummary from ._models_py3 import DataExport - from ._models_py3 import DataExportErrorResponse from ._models_py3 import DataExportListResult from ._models_py3 import DataSource from ._models_py3 import DataSourceFilter from ._models_py3 import DataSourceListResult from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorContract + from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse from ._models_py3 import Identity from ._models_py3 import IntelligencePack @@ -72,19 +70,17 @@ from ._models import AvailableServiceTier # type: ignore from ._models import AzureEntityResource # type: ignore from ._models import Cluster # type: ignore - from ._models import ClusterErrorResponse # type: ignore from ._models import ClusterListResult # type: ignore from ._models import ClusterPatch # type: ignore from ._models import ClusterSku # type: ignore from ._models import CoreSummary # type: ignore from ._models import DataExport # type: ignore - from ._models import DataExportErrorResponse # type: ignore from ._models import DataExportListResult # type: ignore from ._models import DataSource # type: ignore from ._models import DataSourceFilter # type: ignore from ._models import DataSourceListResult # type: ignore from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorContract # type: ignore + from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore from ._models import Identity # type: ignore from ._models import IntelligencePack # type: ignore @@ -153,19 +149,17 @@ 'AvailableServiceTier', 'AzureEntityResource', 'Cluster', - 'ClusterErrorResponse', 'ClusterListResult', 'ClusterPatch', 'ClusterSku', 'CoreSummary', 'DataExport', - 'DataExportErrorResponse', 'DataExportListResult', 'DataSource', 'DataSourceFilter', 'DataSourceListResult', 'ErrorAdditionalInfo', - 'ErrorContract', + 'ErrorDetail', 'ErrorResponse', 'Identity', 'IntelligencePack', diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_log_analytics_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_log_analytics_management_client_enums.py index c5a96026c1a7..06cc3b998a3d 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/_log_analytics_management_client_enums.py @@ -188,3 +188,4 @@ class WorkspaceSkuNameEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PER_GB2018 = "PerGB2018" STANDALONE = "Standalone" CAPACITY_RESERVATION = "CapacityReservation" + LA_CLUSTER = "LACluster" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py index 1c094840d299..a2771d302a1f 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py @@ -259,25 +259,6 @@ def __init__( self.key_vault_properties = kwargs.get('key_vault_properties', None) -class ClusterErrorResponse(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - class ClusterListResult(msrest.serialization.Model): """The list clusters operation response. @@ -450,25 +431,6 @@ def __init__( self.event_hub_name = kwargs.get('event_hub_name', None) -class DataExportErrorResponse(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(DataExportErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - class DataExportListResult(msrest.serialization.Model): """Result of the request to list data exports. @@ -635,27 +597,8 @@ def __init__( self.info = None -class ErrorContract(msrest.serialization.Model): - """Contains details when the response code indicates an error. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorContract, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -666,7 +609,7 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.loganalytics.models.ErrorResponse] + :vartype details: list[~azure.mgmt.loganalytics.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.loganalytics.models.ErrorAdditionalInfo] """ @@ -683,7 +626,7 @@ class ErrorResponse(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -691,7 +634,7 @@ def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -699,6 +642,25 @@ def __init__( self.additional_info = None +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~azure.mgmt.loganalytics.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + class Identity(msrest.serialization.Model): """Identity for the resource. @@ -1796,10 +1758,15 @@ class Workspace(TrackedResource): :vartype customer_id: str :param sku: The SKU of the workspace. :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku - :param retention_in_days: The workspace data retention in days, between 30 and 730. + :param retention_in_days: The workspace data retention in days. Allowed values are per pricing + plan. See pricing tiers documentation for details. :type retention_in_days: int :param workspace_capping: The daily volume cap for ingestion. :type workspace_capping: ~azure.mgmt.loganalytics.models.WorkspaceCapping + :ivar created_date: Workspace creation date. + :vartype created_date: str + :ivar modified_date: Workspace modification date. + :vartype modified_date: str :param public_network_access_for_ingestion: The network access type for accessing Log Analytics ingestion. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_ingestion: str or @@ -1808,9 +1775,14 @@ class Workspace(TrackedResource): query. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_query: str or ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param force_cmk_for_query: Indicates whether customer managed storage is mandatory for query + management. + :type force_cmk_for_query: bool :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param features: Workspace features. + :type features: dict[str, object] """ _validation = { @@ -1819,7 +1791,8 @@ class Workspace(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'customer_id': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': 30}, + 'created_date': {'readonly': True}, + 'modified_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -1835,9 +1808,13 @@ class Workspace(TrackedResource): 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, 'workspace_capping': {'key': 'properties.workspaceCapping', 'type': 'WorkspaceCapping'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'modified_date': {'key': 'properties.modifiedDate', 'type': 'str'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'force_cmk_for_query': {'key': 'properties.forceCmkForQuery', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'features': {'key': 'properties.features', 'type': '{object}'}, } def __init__( @@ -1851,9 +1828,13 @@ def __init__( self.sku = kwargs.get('sku', None) self.retention_in_days = kwargs.get('retention_in_days', None) self.workspace_capping = kwargs.get('workspace_capping', None) + self.created_date = None + self.modified_date = None self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.force_cmk_for_query = kwargs.get('force_cmk_for_query', None) self.private_link_scoped_resources = None + self.features = kwargs.get('features', None) class WorkspaceCapping(msrest.serialization.Model): @@ -1974,10 +1955,15 @@ class WorkspacePatch(AzureEntityResource): :vartype customer_id: str :param sku: The SKU of the workspace. :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku - :param retention_in_days: The workspace data retention in days, between 30 and 730. + :param retention_in_days: The workspace data retention in days. Allowed values are per pricing + plan. See pricing tiers documentation for details. :type retention_in_days: int :param workspace_capping: The daily volume cap for ingestion. :type workspace_capping: ~azure.mgmt.loganalytics.models.WorkspaceCapping + :ivar created_date: Workspace creation date. + :vartype created_date: str + :ivar modified_date: Workspace modification date. + :vartype modified_date: str :param public_network_access_for_ingestion: The network access type for accessing Log Analytics ingestion. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_ingestion: str or @@ -1986,9 +1972,14 @@ class WorkspacePatch(AzureEntityResource): query. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_query: str or ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param force_cmk_for_query: Indicates whether customer managed storage is mandatory for query + management. + :type force_cmk_for_query: bool :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param features: Workspace features. + :type features: dict[str, object] """ _validation = { @@ -1997,7 +1988,8 @@ class WorkspacePatch(AzureEntityResource): 'type': {'readonly': True}, 'etag': {'readonly': True}, 'customer_id': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': 30}, + 'created_date': {'readonly': True}, + 'modified_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -2012,9 +2004,13 @@ class WorkspacePatch(AzureEntityResource): 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, 'workspace_capping': {'key': 'properties.workspaceCapping', 'type': 'WorkspaceCapping'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'modified_date': {'key': 'properties.modifiedDate', 'type': 'str'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'force_cmk_for_query': {'key': 'properties.forceCmkForQuery', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'features': {'key': 'properties.features', 'type': '{object}'}, } def __init__( @@ -2028,9 +2024,13 @@ def __init__( self.sku = kwargs.get('sku', None) self.retention_in_days = kwargs.get('retention_in_days', None) self.workspace_capping = kwargs.get('workspace_capping', None) + self.created_date = None + self.modified_date = None self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.force_cmk_for_query = kwargs.get('force_cmk_for_query', None) self.private_link_scoped_resources = None + self.features = kwargs.get('features', None) class WorkspacePurgeBody(msrest.serialization.Model): @@ -2159,7 +2159,7 @@ class WorkspaceSku(msrest.serialization.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", "PerNode", "PerGB2018", "Standalone", "CapacityReservation". + "Premium", "PerNode", "PerGB2018", "Standalone", "CapacityReservation", "LACluster". :type name: str or ~azure.mgmt.loganalytics.models.WorkspaceSkuNameEnum :param capacity_reservation_level: The capacity reservation level for this workspace, when CapacityReservation sku is selected. diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py index 039a497b3475..808573c41c97 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py @@ -274,27 +274,6 @@ def __init__( self.key_vault_properties = key_vault_properties -class ClusterErrorResponse(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - *, - error: Optional["ErrorResponse"] = None, - **kwargs - ): - super(ClusterErrorResponse, self).__init__(**kwargs) - self.error = error - - class ClusterListResult(msrest.serialization.Model): """The list clusters operation response. @@ -488,27 +467,6 @@ def __init__( self.event_hub_name = event_hub_name -class DataExportErrorResponse(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - *, - error: Optional["ErrorResponse"] = None, - **kwargs - ): - super(DataExportErrorResponse, self).__init__(**kwargs) - self.error = error - - class DataExportListResult(msrest.serialization.Model): """Result of the request to list data exports. @@ -687,29 +645,8 @@ def __init__( self.info = None -class ErrorContract(msrest.serialization.Model): - """Contains details when the response code indicates an error. - - :param error: The details of the error. - :type error: ~azure.mgmt.loganalytics.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - *, - error: Optional["ErrorResponse"] = None, - **kwargs - ): - super(ErrorContract, self).__init__(**kwargs) - self.error = error - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -720,7 +657,7 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.loganalytics.models.ErrorResponse] + :vartype details: list[~azure.mgmt.loganalytics.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.loganalytics.models.ErrorAdditionalInfo] """ @@ -737,7 +674,7 @@ class ErrorResponse(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -745,7 +682,7 @@ def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -753,6 +690,27 @@ def __init__( self.additional_info = None +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~azure.mgmt.loganalytics.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + class Identity(msrest.serialization.Model): """Identity for the resource. @@ -1981,10 +1939,15 @@ class Workspace(TrackedResource): :vartype customer_id: str :param sku: The SKU of the workspace. :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku - :param retention_in_days: The workspace data retention in days, between 30 and 730. + :param retention_in_days: The workspace data retention in days. Allowed values are per pricing + plan. See pricing tiers documentation for details. :type retention_in_days: int :param workspace_capping: The daily volume cap for ingestion. :type workspace_capping: ~azure.mgmt.loganalytics.models.WorkspaceCapping + :ivar created_date: Workspace creation date. + :vartype created_date: str + :ivar modified_date: Workspace modification date. + :vartype modified_date: str :param public_network_access_for_ingestion: The network access type for accessing Log Analytics ingestion. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_ingestion: str or @@ -1993,9 +1956,14 @@ class Workspace(TrackedResource): query. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_query: str or ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param force_cmk_for_query: Indicates whether customer managed storage is mandatory for query + management. + :type force_cmk_for_query: bool :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param features: Workspace features. + :type features: dict[str, object] """ _validation = { @@ -2004,7 +1972,8 @@ class Workspace(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'customer_id': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': 30}, + 'created_date': {'readonly': True}, + 'modified_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -2020,9 +1989,13 @@ class Workspace(TrackedResource): 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, 'workspace_capping': {'key': 'properties.workspaceCapping', 'type': 'WorkspaceCapping'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'modified_date': {'key': 'properties.modifiedDate', 'type': 'str'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'force_cmk_for_query': {'key': 'properties.forceCmkForQuery', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'features': {'key': 'properties.features', 'type': '{object}'}, } def __init__( @@ -2037,6 +2010,8 @@ def __init__( workspace_capping: Optional["WorkspaceCapping"] = None, public_network_access_for_ingestion: Optional[Union[str, "PublicNetworkAccessType"]] = "Enabled", public_network_access_for_query: Optional[Union[str, "PublicNetworkAccessType"]] = "Enabled", + force_cmk_for_query: Optional[bool] = None, + features: Optional[Dict[str, object]] = None, **kwargs ): super(Workspace, self).__init__(tags=tags, location=location, **kwargs) @@ -2046,9 +2021,13 @@ def __init__( self.sku = sku self.retention_in_days = retention_in_days self.workspace_capping = workspace_capping + self.created_date = None + self.modified_date = None self.public_network_access_for_ingestion = public_network_access_for_ingestion self.public_network_access_for_query = public_network_access_for_query + self.force_cmk_for_query = force_cmk_for_query self.private_link_scoped_resources = None + self.features = features class WorkspaceCapping(msrest.serialization.Model): @@ -2177,10 +2156,15 @@ class WorkspacePatch(AzureEntityResource): :vartype customer_id: str :param sku: The SKU of the workspace. :type sku: ~azure.mgmt.loganalytics.models.WorkspaceSku - :param retention_in_days: The workspace data retention in days, between 30 and 730. + :param retention_in_days: The workspace data retention in days. Allowed values are per pricing + plan. See pricing tiers documentation for details. :type retention_in_days: int :param workspace_capping: The daily volume cap for ingestion. :type workspace_capping: ~azure.mgmt.loganalytics.models.WorkspaceCapping + :ivar created_date: Workspace creation date. + :vartype created_date: str + :ivar modified_date: Workspace modification date. + :vartype modified_date: str :param public_network_access_for_ingestion: The network access type for accessing Log Analytics ingestion. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_ingestion: str or @@ -2189,9 +2173,14 @@ class WorkspacePatch(AzureEntityResource): query. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :type public_network_access_for_query: str or ~azure.mgmt.loganalytics.models.PublicNetworkAccessType + :param force_cmk_for_query: Indicates whether customer managed storage is mandatory for query + management. + :type force_cmk_for_query: bool :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: list[~azure.mgmt.loganalytics.models.PrivateLinkScopedResource] + :param features: Workspace features. + :type features: dict[str, object] """ _validation = { @@ -2200,7 +2189,8 @@ class WorkspacePatch(AzureEntityResource): 'type': {'readonly': True}, 'etag': {'readonly': True}, 'customer_id': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': 30}, + 'created_date': {'readonly': True}, + 'modified_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -2215,9 +2205,13 @@ class WorkspacePatch(AzureEntityResource): 'sku': {'key': 'properties.sku', 'type': 'WorkspaceSku'}, 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, 'workspace_capping': {'key': 'properties.workspaceCapping', 'type': 'WorkspaceCapping'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'str'}, + 'modified_date': {'key': 'properties.modifiedDate', 'type': 'str'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'force_cmk_for_query': {'key': 'properties.forceCmkForQuery', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.privateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'features': {'key': 'properties.features', 'type': '{object}'}, } def __init__( @@ -2230,6 +2224,8 @@ def __init__( workspace_capping: Optional["WorkspaceCapping"] = None, public_network_access_for_ingestion: Optional[Union[str, "PublicNetworkAccessType"]] = "Enabled", public_network_access_for_query: Optional[Union[str, "PublicNetworkAccessType"]] = "Enabled", + force_cmk_for_query: Optional[bool] = None, + features: Optional[Dict[str, object]] = None, **kwargs ): super(WorkspacePatch, self).__init__(**kwargs) @@ -2239,9 +2235,13 @@ def __init__( self.sku = sku self.retention_in_days = retention_in_days self.workspace_capping = workspace_capping + self.created_date = None + self.modified_date = None self.public_network_access_for_ingestion = public_network_access_for_ingestion self.public_network_access_for_query = public_network_access_for_query + self.force_cmk_for_query = force_cmk_for_query self.private_link_scoped_resources = None + self.features = features class WorkspacePurgeBody(msrest.serialization.Model): @@ -2382,7 +2382,7 @@ class WorkspaceSku(msrest.serialization.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", "PerNode", "PerGB2018", "Standalone", "CapacityReservation". + "Premium", "PerNode", "PerGB2018", "Standalone", "CapacityReservation", "LACluster". :type name: str or ~azure.mgmt.loganalytics.models.WorkspaceSkuNameEnum :param capacity_reservation_level: The capacity reservation level for this workspace, when CapacityReservation sku is selected. diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py index 226464ccc68c..031bb95bb164 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py @@ -108,7 +108,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -231,7 +231,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -357,7 +357,7 @@ def _delete_initial( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -479,7 +479,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -547,7 +547,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ClusterErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py index 0ddfe4b71ee4..7b0e0fcb4720 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_exports_operations.py @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -182,7 +182,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -250,7 +250,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataExport', pipeline_response) @@ -314,7 +314,7 @@ def delete( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DataExportErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_deleted_workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_deleted_workspaces_operations.py index b387e58c1a37..9ef6a144831d 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_deleted_workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_deleted_workspaces_operations.py @@ -102,8 +102,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -173,8 +174,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_tables_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_tables_operations.py index b74ae0cc20c2..74f3efc473b3 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_tables_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_tables_operations.py @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -182,7 +182,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Table', pipeline_response) @@ -246,7 +246,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Table', pipeline_response) 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 ef25117d7e9e..03516d303c4b 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 @@ -104,8 +104,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -175,8 +176,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +231,8 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -330,6 +333,7 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-08-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -348,6 +352,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -355,7 +360,8 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -484,7 +490,8 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workspace', pipeline_response) @@ -551,7 +558,8 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workspace', pipeline_response)