diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py index e6e4b398a17f..d6848a68da22 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py @@ -61,7 +61,8 @@ def get( :return: ManagementPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.storage.v2019_06_01.models.ManagementPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -92,9 +93,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -131,7 +130,8 @@ def create_or_update( :return: ManagementPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.storage.v2019_06_01.models.ManagementPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ properties = models.ManagementPolicy(policy=policy) @@ -168,9 +168,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py index 528a9d2c90e5..dcbaf89dec12 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py @@ -141,9 +141,7 @@ def _create_initial( response = self._client.send(request, 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -186,7 +184,8 @@ def create( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storage.v2019_06_01.models.StorageAccount] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storage.v2019_06_01.models.StorageAccount]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -298,7 +297,8 @@ def get_properties( :return: StorageAccount or ClientRawResponse if raw=true :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageAccount or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get_properties.metadata['url'] @@ -330,9 +330,7 @@ def get_properties( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -376,7 +374,8 @@ def update( :return: StorageAccount or ClientRawResponse if raw=true :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageAccount or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -410,9 +409,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -661,7 +658,8 @@ def regenerate_key( :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageAccountListKeysResult or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ regenerate_key1 = models.StorageAccountRegenerateKeyParameters(key_name=key_name) @@ -697,9 +695,7 @@ def regenerate_key( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: