diff --git a/sdk/compute/azure-mgmt-compute/_meta.json b/sdk/compute/azure-mgmt-compute/_meta.json index c01a567cc22b..eb0438cf6055 100644 --- a/sdk/compute/azure-mgmt-compute/_meta.json +++ b/sdk/compute/azure-mgmt-compute/_meta.json @@ -1,11 +1,57 @@ { - "commit": "07f6af5ba991088995d774e80e3d94b364611baf", + "commit": "786252c0875997e2cb0a57f24a57789b3325f7dd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.7", + "autorest": "3.10.2", "use": [ - "@autorest/python@6.13.7", + "@autorest/python@6.13.19", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False", - "readme": "specification/compute/resource-manager/readme.md" + "autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.13.19 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/compute/resource-manager/readme.md", + "package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json", + "package-2023-10-02-only": "2023-12-19 03:18:52 -0500 4a4e7c0083937d49061641e857bc876043bb1f5b Microsoft.Compute/DiskRP/stable/2023-10-02/snapshot.json", + "package-2023-09-01-only": "2023-12-05 16:05:55 -0500 378977e71101fdf224414b86e9f7d8c776cd07ec Microsoft.Compute/ComputeRP/stable/2023-09-01/virtualMachineScaleSet.json", + "package-2023-07-03-only": "2024-02-08 13:16:01 -0500 f715b7fee5e648d06b17467b08473f6cbeee84e0 Microsoft.Compute/GalleryRP/stable/2023-07-03/sharedGallery.json", + "package-2023-07-01-only": "2023-08-10 16:21:40 -0400 1a925d1afe288a5f20d078bbc89214a36a0e4287 Microsoft.Compute/ComputeRP/stable/2023-07-01/virtualMachineScaleSet.json", + "package-2023-04-02-only": "2023-08-07 20:58:57 -0400 b9403296f0b0e112b0d8222ad05fd1d79ee10e03 Microsoft.Compute/DiskRP/stable/2023-04-02/snapshot.json", + "package-2023-03-01-only": "2023-04-17 22:42:05 -0400 b06a6f45e472dd07c2e0dab06b1e52dfe2684c88 Microsoft.Compute/ComputeRP/stable/2023-03-01/virtualMachineScaleSet.json", + "package-2023-01-02-only": "2023-06-28 00:48:15 -0400 b1d41f8dc643415d4dc6ee82bdb2fef04ef45bc9 Microsoft.Compute/DiskRP/stable/2023-01-02/snapshot.json", + "package-2022-11-01-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json", + "package-2022-09-04-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json", + "package-2022-08-03-only": "2023-11-28 14:37:35 -0500 a4d77e0bd0f00b66d42940a9be143fdb38534b1e Microsoft.Compute/GalleryRP/stable/2022-08-03/sharedGallery.json", + "package-2022-08-01-only": "2023-07-25 07:16:18 +0530 324d833f80ccd86dfd5b8035625ea17b537edf51 Microsoft.Compute/ComputeRP/stable/2022-08-01/computeRPCommon.json", + "package-2022-07-02-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json", + "package-2022-04-04-only": "2022-08-04 22:48:19 -0400 a31c376ede1e91abc3ab476ae8e8d316e80541c0 Microsoft.Compute/CloudserviceRP/stable/2022-04-04/cloudService.json", + "package-2022-03-03-only": "2023-05-16 23:00:04 -0400 a2140e7ff0a6c28df501b16c51fe85b762a386fc Microsoft.Compute/GalleryRP/stable/2022-03-03/communityGallery.json", + "package-2022-03-02-only": "2022-08-04 22:48:19 -0400 a31c376ede1e91abc3ab476ae8e8d316e80541c0 Microsoft.Compute/DiskRP/stable/2022-03-02/snapshot.json", + "package-2022-03-01-only": "2022-10-13 19:55:58 -0700 ab898cdcc6e69ae41cb27ceee6abbe4e505e4a73 Microsoft.Compute/ComputeRP/stable/2022-03-01/virtualMachineScaleSet.json", + "package-2022-01-03-only": "2023-02-02 02:56:58 -0600 5920340193de5e6cbfdc514218bd76a602c22b4b Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json", + "package-2021-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-12-01/disk.json", + "package-2021-11-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2021-11-01/runCommands.json", + "package-2021-10-01-only": "2023-02-02 02:56:58 -0600 5920340193de5e6cbfdc514218bd76a602c22b4b Microsoft.Compute/GalleryRP/stable/2021-10-01/gallery.json", + "package-2021-08-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-08-01/disk.json", + "package-2021-07-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2021-07-01/skus.json", + "package-2021-04-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-04-01/disk.json", + "package-2021-03-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2021-03-01/runCommands.json", + "package-2020-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-12-01/disk.json", + "package-2020-10-01-preview-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/CloudserviceRP/preview/2020-10-01-preview/cloudService.json", + "package-2020-09-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/preview/2020-09-30/sharedGallery.json", + "package-2020-06-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-06-30/disk.json", + "package-2020-06-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2020-06-01/runCommands.json", + "package-2020-05-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-05-01/disk.json", + "package-2019-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-12-01/gallery.json", + "package-2019-11-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2019-11-01/disk.json", + "package-2019-07-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-07-01/gallery.json", + "package-2019-04-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2019-04-01/skus.json", + "package-2019-03-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-03-01/gallery.json", + "package-2018-10-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2018-10-01/runCommands.json", + "package-2018-09-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2018-09-30/disk.json", + "package-compute-only-2018-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2018-06-01/gallery.json", + "package-compute-2018-04": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2018-04-01/disk.json", + "package-compute-only-2017-12": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2017-12-01/runCommands.json", + "package-skus-2017-09": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2017-09-01/skus.json", + "package-compute-2017-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2017-03-30/disk.json", + "package-compute-2016-04-preview": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/preview/2016-04-30-preview/disk.json", + "package-compute-2016-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2016-03-30/compute.json", + "package-compute-2015-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2015-06-15/compute.json" } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py index 75e26c415d2c..8a43569e0754 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py @@ -1447,7 +1447,7 @@ def _deserialize(self, target_obj, data): elif isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) - if data is None: + if data is None or data is CoreNull: return data try: attributes = response._attribute_map # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py index 9bfdae79ef2e..b11c9de226c1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -89,6 +90,10 @@ build_virtual_machines_start_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -182,7 +187,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -251,7 +256,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +313,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +373,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -453,7 +458,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +561,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +620,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -688,7 +693,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -764,7 +769,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -973,7 +978,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1179,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1307,7 +1312,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1393,7 +1398,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1473,7 +1478,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1540,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1593,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1646,7 +1651,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1728,7 +1733,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1829,7 +1834,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1920,7 +1925,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2116,7 +2121,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2303,7 +2308,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2424,7 +2429,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2471,7 +2476,7 @@ async def get( async def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2593,7 +2598,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2654,7 +2659,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2733,7 +2738,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2817,7 +2822,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2884,7 +2889,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2995,7 +3000,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3105,7 +3110,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3215,7 +3220,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3350,7 +3355,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3537,7 +3542,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3655,7 +3660,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3710,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3910,7 +3915,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4113,7 +4118,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4179,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4255,7 +4260,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4340,7 +4345,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4411,7 +4416,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4616,7 +4621,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4815,7 +4820,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5014,7 +5019,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5206,7 +5211,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5337,7 +5342,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5451,7 +5456,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5567,7 +5572,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5691,7 +5696,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5751,7 +5756,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5834,7 +5839,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5904,7 +5909,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6020,7 +6025,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6134,7 +6139,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py index d82ae348e72c..ce49e3dc92a3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py @@ -24,8 +24,8 @@ class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
`:code:`
` Possible values - are::code:`
`:code:`
` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
`:code:`
` **FromImage** \u2013 + are::code:`
`:code:`
` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
`:code:`
` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -44,8 +44,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
`:code:`
` Possible values are: :code:`
`\ - **http** :code:`
`:code:`
` **https**. + """Specifies the protocol of listener. :code:`
`:code:`
` Possible values are: + :code:`
`\\ **http** :code:`
`:code:`
` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py index 58de56f77a61..d91a920c530a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py @@ -466,9 +466,9 @@ class DataDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
`:code:`
` **FromImage** \u2013 This value is used when you are using an + created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
`:code:`
` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -528,9 +528,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
`:code:`
` **FromImage** \u2013 This value is used when you are using an + created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
`:code:`
` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1172,9 +1172,9 @@ class OSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
`:code:`
` **FromImage** \u2013 This value is used when you are using an + created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
`:code:`
` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1239,9 +1239,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
`:code:`
` **FromImage** \u2013 This value is used when you are using an + created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
`:code:`
` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1310,7 +1310,7 @@ class OSProfile(_serialization.Model): :code:`
`:code:`
` **Max-length (Linux):** 64 characters :code:`
`:code:`
` **Max-length (Windows):** 20 characters :code:`
`:code:`
`:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -1321,7 +1321,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -1392,7 +1392,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -1403,7 +1403,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -1546,7 +1546,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -1566,7 +1566,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -3359,7 +3359,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -3412,7 +3412,7 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -3454,7 +3454,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3465,7 +3465,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3521,7 +3521,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3532,7 +3532,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4299,7 +4299,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -4326,7 +4326,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py index 84fa8ec0d846..f82d9a95273b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1922,7 +1927,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1991,7 +1996,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2048,7 +2053,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2107,7 +2112,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2191,7 +2196,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2294,7 +2299,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2353,7 +2358,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2426,7 +2431,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2502,7 +2507,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2711,7 +2716,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3045,7 +3050,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3131,7 +3136,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3211,7 +3216,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3273,7 +3278,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3326,7 +3331,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3384,7 +3389,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3466,7 +3471,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3566,7 +3571,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3657,7 +3662,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3852,7 +3857,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4036,7 +4041,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4157,7 +4162,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4204,7 +4209,7 @@ def get( def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4323,7 +4328,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4383,7 +4388,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4461,7 +4466,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4544,7 +4549,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4611,7 +4616,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4721,7 +4726,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4830,7 +4835,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4939,7 +4944,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5073,7 +5078,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5260,7 +5265,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5376,7 +5381,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5426,7 +5431,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5630,7 +5635,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5832,7 +5837,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5893,7 +5898,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5974,7 +5979,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6059,7 +6064,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6130,7 +6135,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6334,7 +6339,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6532,7 +6537,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6730,7 +6735,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6921,7 +6926,7 @@ def get_long_running_output(pipeline_response): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7051,7 +7056,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7164,7 +7169,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7279,7 +7284,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7403,7 +7408,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7463,7 +7468,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7546,7 +7551,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7616,7 +7621,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7731,7 +7736,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7844,7 +7849,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py index 8eddafbd8baf..a357c80961ef 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -91,6 +92,10 @@ build_virtual_machines_start_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -184,7 +189,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +258,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -310,7 +315,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -373,7 +378,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -453,7 +458,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -538,7 +543,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +646,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -700,7 +705,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -773,7 +778,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +854,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1058,7 +1063,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1259,7 +1264,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,7 +1397,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1474,7 +1479,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1525,7 +1530,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1721,7 +1726,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1908,7 +1913,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2029,7 +2034,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2081,7 @@ async def get( async def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2198,7 +2203,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2264,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2338,7 +2343,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2422,7 +2427,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2489,7 +2494,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2600,7 +2605,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2710,7 +2715,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2820,7 +2825,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2968,7 +2973,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3048,7 +3053,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3110,7 +3115,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3163,7 +3168,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3226,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3303,7 +3308,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3404,7 +3409,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3495,7 +3500,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3682,7 +3687,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3800,7 +3805,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3850,7 +3855,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4055,7 +4060,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4258,7 +4263,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4319,7 +4324,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4485,7 +4490,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4556,7 +4561,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4761,7 +4766,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4965,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5159,7 +5164,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5351,7 +5356,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5482,7 +5487,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5596,7 +5601,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5712,7 +5717,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5836,7 +5841,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5896,7 +5901,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5979,7 +5984,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6049,7 +6054,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6165,7 +6170,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6279,7 +6284,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py index 2b7e48ead730..92118f0ab8c9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py @@ -24,8 +24,8 @@ class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -44,8 +44,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py index 7d61969491d0..2e7ffd804392 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py @@ -466,9 +466,9 @@ class DataDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -528,9 +528,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1174,9 +1174,9 @@ class OSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1241,9 +1241,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1312,7 +1312,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -1323,7 +1323,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -1394,7 +1394,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -1405,7 +1405,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -1548,7 +1548,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -1568,7 +1568,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -3502,7 +3502,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -3555,7 +3555,7 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -3597,7 +3597,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3608,7 +3608,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3664,7 +3664,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3675,7 +3675,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4447,7 +4447,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -4474,7 +4474,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py index d2192c905744..55f9522e3784 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1983,7 +1988,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2052,7 +2057,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2114,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2171,7 +2176,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2250,7 +2255,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2334,7 +2339,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2437,7 +2442,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2496,7 +2501,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2569,7 +2574,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2645,7 +2650,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2854,7 +2859,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3055,7 +3060,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3188,7 +3193,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3270,7 +3275,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,7 +3326,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3516,7 +3521,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3700,7 +3705,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3821,7 +3826,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3868,7 +3873,7 @@ def get( def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3987,7 +3992,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4047,7 +4052,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4125,7 +4130,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4208,7 +4213,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4275,7 +4280,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4385,7 +4390,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4494,7 +4499,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4603,7 +4608,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4750,7 +4755,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4830,7 +4835,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4892,7 +4897,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4945,7 +4950,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5003,7 +5008,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5085,7 +5090,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5185,7 +5190,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5276,7 +5281,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5463,7 +5468,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5579,7 +5584,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5629,7 +5634,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5833,7 +5838,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6035,7 +6040,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6096,7 +6101,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6177,7 +6182,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6262,7 +6267,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6333,7 +6338,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6537,7 +6542,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6735,7 +6740,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6933,7 +6938,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7124,7 +7129,7 @@ def get_long_running_output(pipeline_response): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7254,7 +7259,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7367,7 +7372,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7482,7 +7487,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7606,7 +7611,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7666,7 +7671,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7749,7 +7754,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7819,7 +7824,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7934,7 +7939,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8047,7 +8052,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py index 78ec13713707..4a1122261051 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -115,6 +116,10 @@ build_virtual_machines_start_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -208,7 +213,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +284,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,7 +343,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -400,7 +405,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Availabi ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -481,7 +486,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -568,7 +573,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +676,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,7 +737,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -807,7 +812,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -885,7 +890,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1099,7 +1104,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1304,7 +1309,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1441,7 +1446,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1525,7 +1530,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1578,7 +1583,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1779,7 +1784,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1970,7 +1975,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2095,7 +2100,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2144,7 +2149,7 @@ async def get( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2264,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2385,7 +2390,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2450,7 +2455,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2531,7 +2536,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2617,7 +2622,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2684,7 +2689,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2913,7 +2918,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3027,7 +3032,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3179,7 +3184,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3261,7 +3266,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3325,7 +3330,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3380,7 +3385,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3440,7 +3445,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3527,7 +3532,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: ) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3630,7 +3635,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3717,7 +3722,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3901,7 +3906,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4025,7 +4030,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4090,7 +4095,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4171,7 +4176,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4261,7 +4266,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4453,7 +4458,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4575,7 +4580,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4627,7 +4632,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4836,7 +4841,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5044,7 +5049,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5109,7 +5114,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5192,7 +5197,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS ) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5279,7 +5284,7 @@ def list_skus( ) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5350,7 +5355,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5559,7 +5564,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5762,7 +5767,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5965,7 +5970,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6276,7 +6281,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6412,7 +6417,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6530,7 +6535,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6649,7 +6654,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6769,7 +6774,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6897,7 +6902,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6959,7 +6964,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7042,7 +7047,7 @@ def list( ) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7112,7 +7117,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7232,7 +7237,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7350,7 +7355,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7489,7 +7494,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7676,7 +7681,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7874,7 +7879,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7922,7 +7927,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8051,7 +8056,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8131,7 +8136,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8200,7 +8205,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8398,7 +8403,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8535,7 +8540,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8729,7 +8734,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8935,7 +8940,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8983,7 +8988,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9111,7 +9116,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9191,7 +9196,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9260,7 +9265,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9455,7 +9460,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py index 644efe4f8448..d50ddabffe88 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py @@ -42,8 +42,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -69,8 +69,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py index b421cd3e0948..22125a5cc626 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py @@ -575,9 +575,9 @@ class DataDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -640,9 +640,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2088,9 +2088,9 @@ class OSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2159,9 +2159,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2236,7 +2236,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2247,7 +2247,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2319,7 +2319,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2330,7 +2330,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2473,7 +2473,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -2493,7 +2493,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -4842,7 +4842,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -4900,7 +4900,7 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -4947,7 +4947,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -4958,7 +4958,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5015,7 +5015,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5026,7 +5026,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5827,7 +5827,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -5854,7 +5854,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py index 8e8ace59b7be..b88cb78278ac 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -2725,7 +2730,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2796,7 +2801,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2855,7 +2860,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2917,7 +2922,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AvailabilityS ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2998,7 +3003,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3085,7 +3090,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3188,7 +3193,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3249,7 +3254,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3324,7 +3329,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3402,7 +3407,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3616,7 +3621,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3821,7 +3826,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3963,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4042,7 +4047,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4095,7 +4100,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4295,7 +4300,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4491,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4611,7 +4616,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4660,7 +4665,7 @@ def get( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4774,7 +4779,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4897,7 +4902,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4962,7 +4967,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5043,7 +5048,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5129,7 +5134,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5196,7 +5201,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5310,7 +5315,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5423,7 +5428,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5536,7 +5541,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5687,7 +5692,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5769,7 +5774,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5833,7 +5838,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5888,7 +5893,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5948,7 +5953,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6034,7 +6039,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: ) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6137,7 +6142,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6224,7 +6229,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6405,7 +6410,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6534,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6593,7 +6598,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6673,7 +6678,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6763,7 +6768,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6955,7 +6960,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7075,7 +7080,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7127,7 +7132,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7335,7 +7340,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7542,7 +7547,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7607,7 +7612,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir ) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7690,7 +7695,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: ) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7777,7 +7782,7 @@ def list_skus( ) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7848,7 +7853,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8056,7 +8061,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8258,7 +8263,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8460,7 +8465,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8656,7 +8661,7 @@ def get_long_running_output(pipeline_response): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8769,7 +8774,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8909,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9021,7 +9026,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9139,7 +9144,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9258,7 +9263,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9386,7 +9391,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9448,7 +9453,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9531,7 +9536,7 @@ def list( ) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9601,7 +9606,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9720,7 +9725,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9837,7 +9842,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9975,7 +9980,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10162,7 +10167,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10360,7 +10365,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10408,7 +10413,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10536,7 +10541,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10615,7 +10620,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10684,7 +10689,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10876,7 +10881,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11012,7 +11017,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11200,7 +11205,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11400,7 +11405,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11448,7 +11453,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11575,7 +11580,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11654,7 +11659,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11723,7 +11728,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11912,7 +11917,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py index 4558db66d0fe..888000f6a2cb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -130,6 +131,10 @@ build_virtual_machines_start_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -227,7 +232,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,7 +301,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +358,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +501,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +586,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -684,7 +689,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,7 +748,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +821,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,7 +897,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1101,7 +1106,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1302,7 +1307,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1435,7 +1440,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1517,7 +1522,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1579,7 +1584,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1649,7 +1654,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1845,7 +1850,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2032,7 +2037,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2153,7 +2158,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2211,7 +2216,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2257,7 +2262,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2368,7 +2373,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2490,7 +2495,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2551,7 +2556,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2630,7 +2635,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2714,7 +2719,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2781,7 +2786,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2892,7 +2897,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3002,7 +3007,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3112,7 +3117,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3222,7 +3227,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3336,7 +3341,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3562,7 +3567,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3642,7 +3647,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3704,7 +3709,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3757,7 +3762,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3815,7 +3820,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3897,7 +3902,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3998,7 +4003,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4085,7 +4090,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4262,7 +4267,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4382,7 +4387,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4442,7 +4447,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4520,7 +4525,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4618,7 +4623,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4708,7 +4713,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4899,7 +4904,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5083,7 +5088,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5201,7 +5206,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5251,7 +5256,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5456,7 +5461,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5659,7 +5664,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5720,7 +5725,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5801,7 +5806,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5886,7 +5891,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5957,7 +5962,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6361,7 +6366,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6560,7 +6565,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6756,7 +6761,7 @@ async def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6955,7 +6960,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7179,7 +7184,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7384,7 +7389,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7517,7 +7522,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7584,7 +7589,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7672,7 +7677,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7782,7 +7787,7 @@ def get_long_running_output(pipeline_response): async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7905,7 +7910,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7972,7 +7977,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8086,7 +8091,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8201,7 +8206,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8317,7 +8322,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8441,7 +8446,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8501,7 +8506,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8584,7 +8589,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8654,7 +8659,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8770,7 +8775,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8884,7 +8889,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9019,7 +9024,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9202,7 +9207,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9396,7 +9401,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9442,7 +9447,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9564,7 +9569,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9641,7 +9646,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9710,7 +9715,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9900,7 +9905,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10033,7 +10038,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10223,7 +10228,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10426,7 +10431,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10472,7 +10477,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10595,7 +10600,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10673,7 +10678,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10742,7 +10747,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10932,7 +10937,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11080,7 +11085,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11155,7 +11160,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py index 7990dddd8f72..1fdcafea60a5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py @@ -41,8 +41,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -87,8 +87,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py index 56d38e22e5ea..e0888d7278d6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py @@ -565,9 +565,9 @@ class DataDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -629,9 +629,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2217,9 +2217,9 @@ class OSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2286,9 +2286,9 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2360,7 +2360,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2371,7 +2371,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2442,7 +2442,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2453,7 +2453,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2598,7 +2598,7 @@ class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-at :ivar name: The name of SKU. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar size: The Size of the SKU. @@ -3410,7 +3410,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. NOTE: If the new VM @@ -3432,7 +3432,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. NOTE: If the new @@ -5974,7 +5974,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :vartype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6030,7 +6030,7 @@ def __init__( storage. ReadOnly for Premium storage**. Known values are: "None", "ReadOnly", and "ReadWrite". :paramtype caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6075,7 +6075,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6086,7 +6086,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6154,7 +6154,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6165,7 +6165,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7666,7 +7666,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -7693,7 +7693,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py index 8e8415fbe7e0..8e7780b6636f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -3212,7 +3217,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3281,7 +3286,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3338,7 +3343,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3400,7 +3405,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3479,7 +3484,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3563,7 +3568,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3666,7 +3671,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3725,7 +3730,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3798,7 +3803,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3874,7 +3879,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4083,7 +4088,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4289,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4417,7 +4422,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4499,7 +4504,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4560,7 +4565,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4630,7 +4635,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4825,7 +4830,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5009,7 +5014,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5130,7 +5135,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5188,7 +5193,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5234,7 +5239,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5344,7 +5349,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5463,7 +5468,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5523,7 +5528,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5601,7 +5606,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5684,7 +5689,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5751,7 +5756,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5861,7 +5866,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5970,7 +5975,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6079,7 +6084,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6188,7 +6193,7 @@ def get_long_running_output(pipeline_response): def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6301,7 +6306,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6523,7 +6528,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6603,7 +6608,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6665,7 +6670,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6718,7 +6723,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6776,7 +6781,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6858,7 +6863,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6958,7 +6963,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7045,7 +7050,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7222,7 +7227,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7342,7 +7347,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7402,7 +7407,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7480,7 +7485,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7577,7 +7582,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7667,7 +7672,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7858,7 +7863,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8042,7 +8047,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8158,7 +8163,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8208,7 +8213,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8412,7 +8417,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8614,7 +8619,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8675,7 +8680,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8756,7 +8761,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8846,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8912,7 +8917,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9116,7 +9121,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9314,7 +9319,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9512,7 +9517,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9707,7 +9712,7 @@ def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9905,7 +9910,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10128,7 +10133,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10333,7 +10338,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10466,7 +10471,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10533,7 +10538,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10621,7 +10626,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10730,7 +10735,7 @@ def get_long_running_output(pipeline_response): def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10852,7 +10857,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10919,7 +10924,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11032,7 +11037,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11146,7 +11151,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11261,7 +11266,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11385,7 +11390,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11445,7 +11450,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11528,7 +11533,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11598,7 +11603,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11713,7 +11718,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11826,7 +11831,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11960,7 +11965,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12143,7 +12148,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12337,7 +12342,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12383,7 +12388,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12505,7 +12510,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12582,7 +12587,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12651,7 +12656,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12838,7 +12843,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12970,7 +12975,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13157,7 +13162,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13357,7 +13362,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13403,7 +13408,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13525,7 +13530,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13602,7 +13607,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13671,7 +13676,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13858,7 +13863,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14005,7 +14010,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14080,7 +14085,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py index 4dd7b9161fb2..b0a7af8d04df 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py @@ -6,7 +6,8 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import sys +from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,6 +30,10 @@ from ..._vendor import _convert_request from ...operations._operations import build_resource_skus_list_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +73,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-09-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py index fb91b105180c..9b9e8ef82f66 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py @@ -26,7 +26,7 @@ class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-at :ivar name: The name of SKU. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar size: The Size of the SKU. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py index 8a4f416f64ff..93d4ad4e2833 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py @@ -6,7 +6,8 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +import sys +from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -29,6 +30,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -94,7 +99,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-09-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py index 4d17d6ac5668..d280fa61f3a5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -126,6 +127,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -166,7 +171,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +326,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +454,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -518,7 +523,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +580,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -638,7 +643,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +808,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,7 +911,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -965,7 +970,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,7 +1043,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1114,7 +1119,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1323,7 +1328,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1524,7 +1529,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1657,7 +1662,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1739,7 +1744,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1806,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1871,7 +1876,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2067,7 +2072,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2258,7 +2263,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2445,7 +2450,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2566,7 +2571,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2624,7 +2629,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2670,7 +2675,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2781,7 +2786,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2903,7 +2908,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2964,7 +2969,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3043,7 +3048,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3127,7 +3132,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3194,7 +3199,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3305,7 +3310,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3415,7 +3420,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3525,7 +3530,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3635,7 +3640,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3749,7 +3754,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3975,7 +3980,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4055,7 +4060,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4117,7 +4122,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4170,7 +4175,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4310,7 +4315,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4411,7 +4416,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4498,7 +4503,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4679,7 +4684,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4865,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4980,7 +4985,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5040,7 +5045,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5118,7 +5123,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5208,7 +5213,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5399,7 +5404,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5583,7 +5588,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5701,7 +5706,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5751,7 +5756,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5956,7 +5961,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6159,7 +6164,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6220,7 +6225,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6301,7 +6306,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6386,7 +6391,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6472,7 +6477,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6543,7 +6548,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6748,7 +6753,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6947,7 +6952,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7146,7 +7151,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7348,7 +7353,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7556,7 +7561,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7752,7 +7757,7 @@ async def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7951,7 +7956,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8164,7 +8169,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8237,7 +8242,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8442,7 +8447,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8575,7 +8580,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8642,7 +8647,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8730,7 +8735,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8840,7 +8845,7 @@ def get_long_running_output(pipeline_response): async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8963,7 +8968,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9030,7 +9035,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9144,7 +9149,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9259,7 +9264,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9380,7 +9385,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9583,7 +9588,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9707,7 +9712,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9767,7 +9772,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9855,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9920,7 +9925,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10036,7 +10041,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10150,7 +10155,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10264,7 +10269,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10379,7 +10384,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10514,7 +10519,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10689,7 +10694,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10897,7 +10902,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10972,7 +10977,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py index 0ba1cf9316a0..a8ab9b0a106d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py @@ -24,8 +24,8 @@ class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -79,8 +79,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py index 64deaa788a08..c8c202c550d8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py @@ -653,9 +653,9 @@ class DataDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -722,9 +722,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2083,9 +2083,9 @@ class OSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2157,9 +2157,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2232,7 +2232,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2243,7 +2243,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2314,7 +2314,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2325,7 +2325,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3178,7 +3178,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -3198,7 +3198,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -5785,7 +5785,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -5846,7 +5846,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -5892,7 +5892,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5903,7 +5903,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5971,7 +5971,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5982,7 +5982,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7689,7 +7689,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -7716,7 +7716,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py index ace48d2df02a..91fe79d2159e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -3055,7 +3060,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3210,7 +3215,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3338,7 +3343,7 @@ def update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3407,7 +3412,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3464,7 +3469,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3526,7 +3531,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3605,7 +3610,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3689,7 +3694,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3792,7 +3797,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3851,7 +3856,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3924,7 +3929,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4000,7 +4005,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4209,7 +4214,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4410,7 +4415,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4543,7 +4548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4625,7 +4630,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4686,7 +4691,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4756,7 +4761,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4951,7 +4956,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5139,7 +5144,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5323,7 +5328,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5444,7 +5449,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5502,7 +5507,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5548,7 +5553,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5658,7 +5663,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5777,7 +5782,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5842,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5915,7 +5920,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5998,7 +6003,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6065,7 +6070,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6175,7 +6180,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6284,7 +6289,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6393,7 +6398,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6502,7 +6507,7 @@ def get_long_running_output(pipeline_response): def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6615,7 +6620,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6837,7 +6842,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6917,7 +6922,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6979,7 +6984,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7032,7 +7037,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7090,7 +7095,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7172,7 +7177,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7272,7 +7277,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7359,7 +7364,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7540,7 +7545,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7721,7 +7726,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, image_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7841,7 +7846,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7901,7 +7906,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7979,7 +7984,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8069,7 +8074,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8260,7 +8265,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8444,7 +8449,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8560,7 +8565,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8610,7 +8615,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8814,7 +8819,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9016,7 +9021,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9077,7 +9082,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9158,7 +9163,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9243,7 +9248,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9329,7 +9334,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9400,7 +9405,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9604,7 +9609,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9802,7 +9807,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10000,7 +10005,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10201,7 +10206,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10408,7 +10413,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10603,7 +10608,7 @@ def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10801,7 +10806,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11013,7 +11018,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11086,7 +11091,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11291,7 +11296,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11424,7 +11429,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11491,7 +11496,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11579,7 +11584,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11688,7 +11693,7 @@ def get_long_running_output(pipeline_response): def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11810,7 +11815,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11877,7 +11882,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11990,7 +11995,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12104,7 +12109,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12224,7 +12229,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12427,7 +12432,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12551,7 +12556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12611,7 +12616,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12694,7 +12699,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12764,7 +12769,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12879,7 +12884,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12992,7 +12997,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13105,7 +13110,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13219,7 +13224,7 @@ def get_long_running_output(pipeline_response): def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Optional[_models.OperationStatusResponse]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13353,7 +13358,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13527,7 +13532,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13734,7 +13739,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13809,7 +13814,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py index b265ec05d623..6878340d49e3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -149,6 +150,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -189,7 +194,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +349,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -472,7 +477,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,7 +546,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -592,7 +597,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +660,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +740,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -820,7 +825,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +985,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,7 +1120,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,7 +1189,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1237,7 +1242,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1296,7 +1301,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1378,7 +1383,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1480,7 +1485,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1544,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1612,7 +1617,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1688,7 +1693,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1897,7 +1902,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2098,7 +2103,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2219,7 +2224,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2280,7 +2285,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2365,7 +2370,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2445,7 +2450,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2507,7 +2512,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2560,7 +2565,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2618,7 +2623,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2700,7 +2705,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2807,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2872,7 +2877,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3067,7 +3072,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3445,7 +3450,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3552,7 +3557,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3610,7 +3615,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3656,7 +3661,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3752,7 +3757,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3857,7 +3862,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3914,7 +3919,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3993,7 +3998,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4077,7 +4082,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4144,7 +4149,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4238,7 +4243,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4424,7 +4429,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4517,7 +4522,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4616,7 +4621,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4838,7 +4843,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4925,7 +4930,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5106,7 +5111,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5287,7 +5292,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5393,7 +5398,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5453,7 +5458,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5531,7 +5536,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5621,7 +5626,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5812,7 +5817,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5996,7 +6001,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6102,7 +6107,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6152,7 +6157,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6338,7 +6343,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6522,7 +6527,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6583,7 +6588,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6664,7 +6669,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6749,7 +6754,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6835,7 +6840,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6906,7 +6911,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7092,7 +7097,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7272,7 +7277,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7452,7 +7457,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7635,7 +7640,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7824,7 +7829,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8001,7 +8006,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8181,7 +8186,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8375,7 +8380,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8448,7 +8453,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8653,7 +8658,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8774,7 +8779,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8846,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8929,7 +8934,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9024,7 +9029,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9132,7 +9137,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9199,7 +9204,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9298,7 +9303,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9398,7 +9403,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9504,7 +9509,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9707,7 +9712,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9819,7 +9824,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9879,7 +9884,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9962,7 +9967,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10032,7 +10037,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10133,7 +10138,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10232,7 +10237,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10331,7 +10336,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10431,7 +10436,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10535,7 +10540,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10754,7 +10759,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10929,7 +10934,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11137,7 +11142,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11212,7 +11217,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11279,7 +11284,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11462,7 +11467,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11656,7 +11661,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11702,7 +11707,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11810,7 +11815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11887,7 +11892,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11956,7 +11961,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12148,7 +12153,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12268,7 +12273,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12458,7 +12463,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12661,7 +12666,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12707,7 +12712,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12816,7 +12821,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12894,7 +12899,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12963,7 +12968,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13155,7 +13160,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py index 13c750cfc880..d152fcbfee34 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py @@ -42,8 +42,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -97,8 +97,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py index 042b976e3cbb..85e3ce7de2d5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py @@ -753,9 +753,9 @@ class DataDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -822,9 +822,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2547,9 +2547,9 @@ class OSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2621,9 +2621,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2696,7 +2696,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2707,7 +2707,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2778,7 +2778,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2789,7 +2789,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3742,7 +3742,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -3762,7 +3762,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -6667,7 +6667,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6734,7 +6734,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6785,7 +6785,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6796,7 +6796,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6864,7 +6864,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6875,7 +6875,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -8627,7 +8627,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -8654,7 +8654,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py index f87b5eebdd1a..42a7fc4aff69 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -3574,7 +3579,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3729,7 +3734,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3857,7 +3862,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3926,7 +3931,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3977,7 +3982,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4039,7 +4044,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4118,7 +4123,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4202,7 +4207,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4362,7 +4367,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4497,7 +4502,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4566,7 +4571,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4619,7 +4624,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4678,7 +4683,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4760,7 +4765,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4862,7 +4867,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4921,7 +4926,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4994,7 +4999,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5070,7 +5075,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5279,7 +5284,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5480,7 +5485,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5601,7 +5606,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5662,7 +5667,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5747,7 +5752,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5827,7 +5832,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5889,7 +5894,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5942,7 +5947,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6000,7 +6005,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6082,7 +6087,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6183,7 +6188,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6253,7 +6258,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6448,7 +6453,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6636,7 +6641,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6820,7 +6825,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6927,7 +6932,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6985,7 +6990,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7031,7 +7036,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7125,7 +7130,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7230,7 +7235,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7286,7 +7291,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7364,7 +7369,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7447,7 +7452,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7514,7 +7519,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7608,7 +7613,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7701,7 +7706,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7794,7 +7799,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7892,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7984,7 +7989,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8202,7 +8207,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8289,7 +8294,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8470,7 +8475,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8651,7 +8656,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8757,7 +8762,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8817,7 +8822,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8895,7 +8900,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8985,7 +8990,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9176,7 +9181,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9360,7 +9365,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9462,7 +9467,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9512,7 +9517,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9698,7 +9703,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9882,7 +9887,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9943,7 +9948,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10024,7 +10029,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10109,7 +10114,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10195,7 +10200,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10266,7 +10271,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10452,7 +10457,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10632,7 +10637,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10812,7 +10817,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10995,7 +11000,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11184,7 +11189,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11361,7 +11366,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11541,7 +11546,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11735,7 +11740,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11808,7 +11813,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12013,7 +12018,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12134,7 +12139,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12201,7 +12206,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12289,7 +12294,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12382,7 +12387,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12490,7 +12495,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12557,7 +12562,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12656,7 +12661,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12756,7 +12761,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12862,7 +12867,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13065,7 +13070,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13177,7 +13182,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13237,7 +13242,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13320,7 +13325,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13390,7 +13395,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13491,7 +13496,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13590,7 +13595,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13689,7 +13694,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13789,7 +13794,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13893,7 +13898,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14109,7 +14114,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14283,7 +14288,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14490,7 +14495,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14565,7 +14570,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14632,7 +14637,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14815,7 +14820,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15009,7 +15014,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15055,7 +15060,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15163,7 +15168,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15240,7 +15245,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15309,7 +15314,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15498,7 +15503,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15616,7 +15621,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15803,7 +15808,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16003,7 +16008,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16049,7 +16054,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16157,7 +16162,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16234,7 +16239,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16303,7 +16308,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16492,7 +16497,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py index a2e97fcfb30f..8df6506c961b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -164,6 +165,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -204,7 +209,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +364,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -487,7 +492,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +561,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +612,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +675,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,7 +755,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +840,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +1000,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1130,7 +1135,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1199,7 +1204,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1252,7 +1257,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1316,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1393,7 +1398,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,7 +1500,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1554,7 +1559,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1627,7 +1632,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1703,7 +1708,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1912,7 +1917,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2113,7 +2118,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2234,7 +2239,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2300,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2380,7 +2385,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2460,7 +2465,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2522,7 +2527,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2575,7 +2580,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2633,7 +2638,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2715,7 +2720,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2817,7 +2822,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3082,7 +3087,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3273,7 +3278,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3460,7 +3465,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3567,7 +3572,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3625,7 +3630,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3671,7 +3676,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3767,7 +3772,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3872,7 +3877,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3929,7 +3934,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4008,7 +4013,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4092,7 +4097,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4159,7 +4164,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4253,7 +4258,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4346,7 +4351,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4439,7 +4444,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4536,7 +4541,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4711,7 +4716,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4810,7 +4815,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5033,7 +5038,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5120,7 +5125,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5301,7 +5306,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5482,7 +5487,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5588,7 +5593,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5648,7 +5653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5726,7 +5731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5816,7 +5821,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6007,7 +6012,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6191,7 +6196,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6297,7 +6302,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6347,7 +6352,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6533,7 +6538,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6717,7 +6722,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6778,7 +6783,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6859,7 +6864,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6944,7 +6949,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7030,7 +7035,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7101,7 +7106,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7287,7 +7292,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7467,7 +7472,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7647,7 +7652,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7830,7 +7835,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8019,7 +8024,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8196,7 +8201,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8380,7 +8385,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8574,7 +8579,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8647,7 +8652,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8852,7 +8857,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8973,7 +8978,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9040,7 +9045,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9128,7 +9133,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9223,7 +9228,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9320,7 +9325,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9428,7 +9433,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,7 +9507,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9692,7 +9697,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9792,7 +9797,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9898,7 +9903,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10101,7 +10106,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10213,7 +10218,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10273,7 +10278,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10356,7 +10361,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10426,7 +10431,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10527,7 +10532,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10631,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10725,7 +10730,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10825,7 +10830,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10929,7 +10934,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11148,7 +11153,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11323,7 +11328,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11531,7 +11536,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11606,7 +11611,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11673,7 +11678,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11873,7 +11878,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11919,7 +11924,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12025,7 +12030,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12102,7 +12107,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12193,7 +12198,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12416,7 +12421,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12463,7 +12468,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12582,7 +12587,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12676,7 +12681,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12934,7 +12939,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12988,7 +12993,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13121,7 +13126,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13210,7 +13215,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13393,7 +13398,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13587,7 +13592,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13633,7 +13638,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13741,7 +13746,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13818,7 +13823,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13887,7 +13892,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14079,7 +14084,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14199,7 +14204,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14389,7 +14394,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14592,7 +14597,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14638,7 +14643,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14747,7 +14752,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14825,7 +14830,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14894,7 +14899,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15086,7 +15091,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py index 1190b8d02b4f..28db92cc0de5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py @@ -66,8 +66,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -171,8 +171,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py index 15eaae41cede..692c0740822a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py @@ -785,9 +785,9 @@ class DataDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -854,9 +854,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3466,9 +3466,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3545,9 +3545,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3621,7 +3621,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3632,7 +3632,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3709,7 +3709,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3720,7 +3720,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4812,7 +4812,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -4832,7 +4832,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -7889,7 +7889,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -7961,7 +7961,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -8016,7 +8016,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -8027,7 +8027,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -8095,7 +8095,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -8106,7 +8106,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -9951,7 +9951,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -9978,7 +9978,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py index 55f29daab062..a479b002c68d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -4069,7 +4074,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4224,7 +4229,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4352,7 +4357,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4421,7 +4426,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4472,7 +4477,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4534,7 +4539,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4613,7 +4618,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4697,7 +4702,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4857,7 +4862,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4992,7 +4997,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5061,7 +5066,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5114,7 +5119,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5173,7 +5178,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5255,7 +5260,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5357,7 +5362,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5416,7 +5421,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5494,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5565,7 +5570,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5774,7 +5779,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5975,7 +5980,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6096,7 +6101,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6157,7 +6162,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6242,7 +6247,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6322,7 +6327,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6384,7 +6389,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6437,7 +6442,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6495,7 +6500,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6577,7 +6582,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6678,7 +6683,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6748,7 +6753,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6943,7 +6948,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7131,7 +7136,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7315,7 +7320,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7422,7 +7427,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7480,7 +7485,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7526,7 +7531,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7620,7 +7625,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7725,7 +7730,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7781,7 +7786,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7859,7 +7864,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7942,7 +7947,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8009,7 +8014,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8103,7 +8108,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8196,7 +8201,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8289,7 +8294,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8386,7 +8391,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8561,7 +8566,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8658,7 +8663,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8877,7 +8882,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8964,7 +8969,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9145,7 +9150,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9326,7 +9331,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9432,7 +9437,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9492,7 +9497,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9570,7 +9575,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9660,7 +9665,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9851,7 +9856,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10035,7 +10040,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10137,7 +10142,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10187,7 +10192,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10373,7 +10378,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10557,7 +10562,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10618,7 +10623,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10699,7 +10704,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10784,7 +10789,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10870,7 +10875,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10941,7 +10946,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11127,7 +11132,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11307,7 +11312,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11487,7 +11492,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11670,7 +11675,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11859,7 +11864,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12036,7 +12041,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12220,7 +12225,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12414,7 +12419,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12487,7 +12492,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12692,7 +12697,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12813,7 +12818,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12880,7 +12885,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12968,7 +12973,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13061,7 +13066,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13158,7 +13163,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13266,7 +13271,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13340,7 +13345,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13530,7 +13535,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13630,7 +13635,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13736,7 +13741,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13939,7 +13944,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14051,7 +14056,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14111,7 +14116,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14194,7 +14199,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14264,7 +14269,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14365,7 +14370,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14464,7 +14469,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14563,7 +14568,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14663,7 +14668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14767,7 +14772,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14983,7 +14988,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15157,7 +15162,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15364,7 +15369,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15439,7 +15444,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15506,7 +15511,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15703,7 +15708,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15749,7 +15754,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15855,7 +15860,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15932,7 +15937,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16023,7 +16028,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16246,7 +16251,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16293,7 +16298,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16411,7 +16416,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16505,7 +16510,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16763,7 +16768,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16817,7 +16822,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16950,7 +16955,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17039,7 +17044,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17222,7 +17227,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17416,7 +17421,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17462,7 +17467,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17570,7 +17575,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17647,7 +17652,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17716,7 +17721,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17905,7 +17910,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18023,7 +18028,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18210,7 +18215,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18410,7 +18415,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18456,7 +18461,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18564,7 +18569,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18641,7 +18646,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18710,7 +18715,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18899,7 +18904,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py index 6fdc43a87667..4e36e0294144 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -50,6 +51,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +82,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +265,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +459,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +505,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -608,7 +613,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -685,7 +690,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -754,7 +759,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -946,7 +951,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1071,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1256,7 +1261,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1459,7 +1464,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1505,7 +1510,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1614,7 +1619,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1692,7 +1697,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1761,7 +1766,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1953,7 +1958,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py index d7a843610df2..0967a019899a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -536,7 +541,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,7 +724,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,7 +918,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,7 +964,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1067,7 +1072,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1144,7 +1149,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1213,7 +1218,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1402,7 +1407,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1520,7 +1525,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1707,7 +1712,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1907,7 +1912,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1953,7 +1958,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2061,7 +2066,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2138,7 +2143,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2207,7 +2212,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2396,7 +2401,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py index 9ddeb727133d..fcde11a451aa 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -135,6 +136,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -175,7 +180,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +335,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -458,7 +463,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -527,7 +532,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +646,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -721,7 +726,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,7 +811,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -966,7 +971,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1101,7 +1106,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1170,7 +1175,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1223,7 +1228,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,7 +1287,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,7 +1369,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,7 +1471,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1525,7 +1530,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1598,7 +1603,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1674,7 +1679,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2084,7 +2089,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2205,7 +2210,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2266,7 +2271,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2351,7 +2356,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2431,7 +2436,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2493,7 +2498,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2551,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2604,7 +2609,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2691,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2793,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2858,7 +2863,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3053,7 +3058,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3244,7 +3249,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3431,7 +3436,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3538,7 +3543,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3596,7 +3601,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3642,7 +3647,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3738,7 +3743,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3843,7 +3848,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3900,7 +3905,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3979,7 +3984,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4063,7 +4068,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4130,7 +4135,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4224,7 +4229,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4317,7 +4322,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4410,7 +4415,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4512,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4682,7 +4687,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4781,7 +4786,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5004,7 +5009,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5091,7 +5096,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5272,7 +5277,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5453,7 +5458,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5559,7 +5564,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5619,7 +5624,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5697,7 +5702,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5787,7 +5792,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5978,7 +5983,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6268,7 +6273,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6318,7 +6323,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6504,7 +6509,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6688,7 +6693,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6749,7 +6754,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6830,7 +6835,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6915,7 +6920,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7001,7 +7006,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7072,7 +7077,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7258,7 +7263,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7438,7 +7443,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7618,7 +7623,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7801,7 +7806,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7990,7 +7995,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8167,7 +8172,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8351,7 +8356,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8545,7 +8550,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8618,7 +8623,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8823,7 +8828,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8944,7 +8949,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9011,7 +9016,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9099,7 +9104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9194,7 +9199,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9291,7 +9296,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9399,7 +9404,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9473,7 +9478,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9663,7 +9668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9763,7 +9768,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9869,7 +9874,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10072,7 +10077,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10184,7 +10189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10244,7 +10249,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10327,7 +10332,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10397,7 +10402,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10498,7 +10503,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10597,7 +10602,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10696,7 +10701,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10796,7 +10801,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10900,7 +10905,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11119,7 +11124,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11294,7 +11299,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11502,7 +11507,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11577,7 +11582,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py index e6d94d37ed06..a3fc98ef7539 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py @@ -39,8 +39,8 @@ class DiffDiskOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -94,8 +94,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py index 8ce08c7020b0..7e9eacedccab 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py @@ -779,9 +779,9 @@ class DataDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -848,9 +848,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2187,9 +2187,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2266,9 +2266,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2342,7 +2342,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2353,7 +2353,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -2430,7 +2430,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -2441,7 +2441,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3399,7 +3399,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -3419,7 +3419,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -6216,7 +6216,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6288,7 +6288,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -6343,7 +6343,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6354,7 +6354,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6422,7 +6422,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -6433,7 +6433,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -8303,7 +8303,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -8330,7 +8330,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py index 64c135eae2a2..03b3cebae715 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -3162,7 +3167,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3317,7 +3322,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3445,7 +3450,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3514,7 +3519,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3570,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3627,7 +3632,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3706,7 +3711,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3790,7 +3795,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3950,7 +3955,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4085,7 +4090,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4154,7 +4159,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4207,7 +4212,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4266,7 +4271,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4348,7 +4353,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4450,7 +4455,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4509,7 +4514,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4582,7 +4587,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4658,7 +4663,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4867,7 +4872,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5068,7 +5073,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5189,7 +5194,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5250,7 +5255,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5335,7 +5340,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5415,7 +5420,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5477,7 +5482,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5530,7 +5535,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5588,7 +5593,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5670,7 +5675,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5771,7 +5776,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5841,7 +5846,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6036,7 +6041,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6224,7 +6229,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6408,7 +6413,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6515,7 +6520,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6573,7 +6578,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6619,7 +6624,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6713,7 +6718,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6818,7 +6823,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6874,7 +6879,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6952,7 +6957,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7035,7 +7040,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7102,7 +7107,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7196,7 +7201,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7289,7 +7294,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7382,7 +7387,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7479,7 +7484,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7659,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7751,7 +7756,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7970,7 +7975,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8057,7 +8062,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8238,7 +8243,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8419,7 +8424,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8525,7 +8530,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8585,7 +8590,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8663,7 +8668,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8753,7 +8758,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8944,7 +8949,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9128,7 +9133,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9230,7 +9235,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9280,7 +9285,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9466,7 +9471,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9650,7 +9655,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9711,7 +9716,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9792,7 +9797,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9877,7 +9882,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9963,7 +9968,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10034,7 +10039,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10220,7 +10225,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10400,7 +10405,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10580,7 +10585,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10763,7 +10768,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10952,7 +10957,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11129,7 +11134,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11313,7 +11318,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11507,7 +11512,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11580,7 +11585,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11785,7 +11790,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11906,7 +11911,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11973,7 +11978,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12061,7 +12066,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12154,7 +12159,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12251,7 +12256,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12359,7 +12364,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12433,7 +12438,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12623,7 +12628,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12723,7 +12728,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12829,7 +12834,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13032,7 +13037,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13144,7 +13149,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13204,7 +13209,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13287,7 +13292,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13357,7 +13362,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13458,7 +13463,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13557,7 +13562,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13656,7 +13661,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13756,7 +13761,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13860,7 +13865,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14076,7 +14081,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14250,7 +14255,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14457,7 +14462,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14532,7 +14537,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py index 219def88fac5..1bf320a037d2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -184,6 +185,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -224,7 +229,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -379,7 +384,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,7 +512,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -576,7 +581,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +632,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -690,7 +695,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -770,7 +775,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,7 +860,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1015,7 +1020,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1150,7 +1155,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1219,7 +1224,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1272,7 +1277,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1331,7 +1336,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1413,7 +1418,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1576,7 +1581,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1708,7 +1713,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1777,7 +1782,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1828,7 +1833,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1891,7 +1896,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1970,7 +1975,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2061,7 +2066,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2269,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2458,7 +2463,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2579,7 +2584,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2646,7 +2651,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2749,7 +2754,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2808,7 +2813,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2881,7 +2886,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2957,7 +2962,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3166,7 +3171,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3367,7 +3372,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3488,7 +3493,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3554,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3634,7 +3639,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3714,7 +3719,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3776,7 +3781,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3829,7 +3834,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3887,7 +3892,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3969,7 +3974,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4071,7 +4076,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4141,7 +4146,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4341,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4527,7 +4532,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4714,7 +4719,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4821,7 +4826,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4879,7 +4884,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4925,7 +4930,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5021,7 +5026,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5126,7 +5131,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5183,7 +5188,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5262,7 +5267,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5346,7 +5351,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5413,7 +5418,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5515,7 +5520,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5608,7 +5613,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5701,7 +5706,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5798,7 +5803,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5973,7 +5978,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6072,7 +6077,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6295,7 +6300,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6382,7 +6387,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6563,7 +6568,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6744,7 +6749,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6850,7 +6855,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6910,7 +6915,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6988,7 +6993,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7078,7 +7083,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7274,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7453,7 +7458,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7559,7 +7564,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7609,7 +7614,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7795,7 +7800,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7979,7 +7984,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8040,7 +8045,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8121,7 +8126,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8206,7 +8211,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8292,7 +8297,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8365,7 +8370,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8569,7 +8574,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8749,7 +8754,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8929,7 +8934,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9112,7 +9117,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9301,7 +9306,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9478,7 +9483,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9662,7 +9667,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9856,7 +9861,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9979,7 +9984,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10059,7 +10064,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10264,7 +10269,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10385,7 +10390,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10452,7 +10457,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10540,7 +10545,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10635,7 +10640,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10732,7 +10737,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10840,7 +10845,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10914,7 +10919,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11104,7 +11109,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11204,7 +11209,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11310,7 +11315,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11513,7 +11518,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11634,7 +11639,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11695,7 +11700,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11778,7 +11783,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11854,7 +11859,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11967,7 +11972,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12066,7 +12071,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12165,7 +12170,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12265,7 +12270,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12369,7 +12374,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12588,7 +12593,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12763,7 +12768,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12971,7 +12976,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13046,7 +13051,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13113,7 +13118,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13313,7 +13318,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13359,7 +13364,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13465,7 +13470,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13542,7 +13547,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13633,7 +13638,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13856,7 +13861,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13903,7 +13908,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14022,7 +14027,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14116,7 +14121,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14374,7 +14379,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14428,7 +14433,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14561,7 +14566,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14655,7 +14660,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14883,7 +14888,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14930,7 +14935,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15050,7 +15055,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15144,7 +15149,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15404,7 +15409,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15458,7 +15463,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15592,7 +15597,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15681,7 +15686,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15864,7 +15869,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16058,7 +16063,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_03_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16104,7 +16109,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16212,7 +16217,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16289,7 +16294,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16358,7 +16363,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16550,7 +16555,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16670,7 +16675,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16860,7 +16865,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17063,7 +17068,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_03_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17109,7 +17114,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17218,7 +17223,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17296,7 +17301,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17365,7 +17370,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17557,7 +17562,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py index 6f52af109a2d..b8215a1b406f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py @@ -90,8 +90,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -252,8 +252,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: :code:`
    `\ - **http** :code:`
    `:code:`
    ` **https**. + """Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values are: + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py index ce00dae0feb6..851887d0f81c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -933,9 +933,9 @@ class DataDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1007,9 +1007,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4637,9 +4637,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4716,9 +4716,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4792,7 +4792,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -4803,7 +4803,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4885,7 +4885,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -4896,7 +4896,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6071,7 +6071,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6091,7 +6091,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -9457,7 +9457,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -9529,7 +9529,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -9584,7 +9584,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -9595,7 +9595,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -9663,7 +9663,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -9674,7 +9674,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -11787,7 +11787,7 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as @@ -11814,7 +11814,7 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of listener. :code:`
    `:code:`
    ` Possible values - are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and + are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py index 2fbdb6648ad1..588beed57f6d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -4761,7 +4766,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4916,7 +4921,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5044,7 +5049,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5113,7 +5118,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5164,7 +5169,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5226,7 +5231,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5305,7 +5310,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5389,7 +5394,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5549,7 +5554,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5684,7 +5689,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5753,7 +5758,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5806,7 +5811,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5865,7 +5870,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5947,7 +5952,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6110,7 +6115,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6242,7 +6247,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6311,7 +6316,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6362,7 +6367,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6422,7 +6427,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6500,7 +6505,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6591,7 +6596,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6791,7 +6796,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6982,7 +6987,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7103,7 +7108,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7169,7 +7174,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7272,7 +7277,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7331,7 +7336,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7404,7 +7409,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7480,7 +7485,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7689,7 +7694,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7890,7 +7895,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8011,7 +8016,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8072,7 +8077,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8157,7 +8162,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8237,7 +8242,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8299,7 +8304,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8352,7 +8357,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8410,7 +8415,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8492,7 +8497,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8593,7 +8598,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8663,7 +8668,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8858,7 +8863,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9046,7 +9051,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9230,7 +9235,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9337,7 +9342,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9395,7 +9400,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9441,7 +9446,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9535,7 +9540,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9640,7 +9645,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9696,7 +9701,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9774,7 +9779,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9857,7 +9862,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9924,7 +9929,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10026,7 +10031,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10119,7 +10124,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10212,7 +10217,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10309,7 +10314,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10484,7 +10489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10581,7 +10586,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10800,7 +10805,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10887,7 +10892,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11068,7 +11073,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11249,7 +11254,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11355,7 +11360,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11415,7 +11420,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11493,7 +11498,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11583,7 +11588,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11774,7 +11779,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11958,7 +11963,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12060,7 +12065,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12110,7 +12115,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12296,7 +12301,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12480,7 +12485,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12541,7 +12546,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12622,7 +12627,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12707,7 +12712,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12793,7 +12798,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12866,7 +12871,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13070,7 +13075,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13250,7 +13255,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13430,7 +13435,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13613,7 +13618,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13802,7 +13807,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13979,7 +13984,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14163,7 +14168,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14357,7 +14362,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14480,7 +14485,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14560,7 +14565,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14765,7 +14770,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14886,7 +14891,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14953,7 +14958,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15041,7 +15046,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15134,7 +15139,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15231,7 +15236,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15339,7 +15344,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15413,7 +15418,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15603,7 +15608,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15703,7 +15708,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15809,7 +15814,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16012,7 +16017,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16133,7 +16138,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16194,7 +16199,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16277,7 +16282,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16353,7 +16358,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16466,7 +16471,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16565,7 +16570,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16664,7 +16669,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16764,7 +16769,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16868,7 +16873,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17084,7 +17089,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17258,7 +17263,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17465,7 +17470,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17540,7 +17545,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17607,7 +17612,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17804,7 +17809,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17850,7 +17855,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17956,7 +17961,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18033,7 +18038,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18124,7 +18129,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18347,7 +18352,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18394,7 +18399,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18512,7 +18517,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18606,7 +18611,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18864,7 +18869,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18918,7 +18923,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19051,7 +19056,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19145,7 +19150,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19373,7 +19378,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19420,7 +19425,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19539,7 +19544,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19633,7 +19638,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19893,7 +19898,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19947,7 +19952,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20081,7 +20086,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20170,7 +20175,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20353,7 +20358,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20547,7 +20552,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_03_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20593,7 +20598,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20701,7 +20706,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20778,7 +20783,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20847,7 +20852,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21036,7 +21041,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21154,7 +21159,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21341,7 +21346,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21541,7 +21546,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_03_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21587,7 +21592,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21695,7 +21700,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21772,7 +21777,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21841,7 +21846,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22030,7 +22035,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py index bd1b2e3703da..9b304e391541 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py @@ -6,7 +6,8 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import sys +from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,6 +30,10 @@ from ..._vendor import _convert_request from ...operations._operations import build_resource_skus_list_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +76,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-04-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py index 5cce9bacd6c4..652796fc1181 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py @@ -26,7 +26,7 @@ class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-at :ivar name: The name of SKU. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar size: The Size of the SKU. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py index bfbaef890b8d..a5093a08bc19 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py @@ -6,7 +6,8 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +import sys +from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -29,6 +30,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -101,7 +106,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_mod api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-04-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py index ff4f6212d105..6fecbdc703f2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -202,6 +203,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -242,7 +247,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,7 +402,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,7 +530,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -594,7 +599,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -645,7 +650,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,7 +713,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,7 +793,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +878,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1033,7 +1038,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1168,7 +1173,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1237,7 +1242,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1298,7 +1303,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1363,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1445,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1603,7 +1608,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1740,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1918,7 +1923,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1997,7 +2002,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2088,7 +2093,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2291,7 +2296,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2485,7 +2490,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2606,7 +2611,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2673,7 +2678,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2776,7 +2781,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2835,7 +2840,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2908,7 +2913,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2984,7 +2989,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3193,7 +3198,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3394,7 +3399,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3515,7 +3520,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,7 +3581,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3661,7 +3666,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3741,7 +3746,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3803,7 +3808,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3856,7 +3861,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3914,7 +3919,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3996,7 +4001,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4098,7 +4103,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4168,7 +4173,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4363,7 +4368,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4557,7 +4562,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4744,7 +4749,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4851,7 +4856,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4909,7 +4914,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4955,7 +4960,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5055,7 +5060,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5165,7 +5170,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5222,7 +5227,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5304,7 +5309,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5389,7 +5394,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5456,7 +5461,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5558,7 +5563,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5651,7 +5656,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5744,7 +5749,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5842,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5934,7 +5939,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6109,7 +6114,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6209,7 +6214,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6432,7 +6437,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6519,7 +6524,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6700,7 +6705,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6881,7 +6886,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6987,7 +6992,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7047,7 +7052,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7125,7 +7130,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7215,7 +7220,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7406,7 +7411,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7590,7 +7595,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7696,7 +7701,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7746,7 +7751,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7932,7 +7937,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8116,7 +8121,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8177,7 +8182,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8258,7 +8263,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8343,7 +8348,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8429,7 +8434,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8502,7 +8507,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8706,7 +8711,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8886,7 +8891,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9066,7 +9071,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9249,7 +9254,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9438,7 +9443,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9615,7 +9620,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9799,7 +9804,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9993,7 +9998,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10116,7 +10121,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10196,7 +10201,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10406,7 +10411,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10612,7 +10617,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10733,7 +10738,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10800,7 +10805,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10888,7 +10893,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10983,7 +10988,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11080,7 +11085,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11188,7 +11193,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11261,7 +11266,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11479,7 +11484,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11688,7 +11693,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11815,7 +11820,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11885,7 +11890,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11961,7 +11966,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12151,7 +12156,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12251,7 +12256,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12357,7 +12362,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12560,7 +12565,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12681,7 +12686,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12742,7 +12747,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12825,7 +12830,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12901,7 +12906,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13014,7 +13019,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13113,7 +13118,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13212,7 +13217,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13312,7 +13317,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13417,7 +13422,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13636,7 +13641,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13811,7 +13816,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14004,7 +14009,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14187,7 +14192,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14381,7 +14386,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_07_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14427,7 +14432,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14535,7 +14540,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14612,7 +14617,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14681,7 +14686,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14873,7 +14878,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14993,7 +14998,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15183,7 +15188,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15386,7 +15391,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_07_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15432,7 +15437,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15541,7 +15546,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15619,7 +15624,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15688,7 +15693,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15880,7 +15885,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16004,7 +16009,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16204,7 +16209,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16414,7 +16419,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16460,7 +16465,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16573,7 +16578,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16651,7 +16656,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16737,7 +16742,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16932,7 +16937,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17127,7 +17132,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17173,7 +17178,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17279,7 +17284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17356,7 +17361,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17447,7 +17452,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17661,7 +17666,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17875,7 +17880,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17922,7 +17927,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18041,7 +18046,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18135,7 +18140,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18371,7 +18376,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18622,7 +18627,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18676,7 +18681,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18809,7 +18814,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18903,7 +18908,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19121,7 +19126,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19342,7 +19347,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19389,7 +19394,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19509,7 +19514,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19603,7 +19608,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19841,7 +19846,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20094,7 +20099,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20148,7 +20153,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20282,7 +20287,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20386,7 +20391,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20461,7 +20466,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py index af2ed91cd7ac..6056aef3aee8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py @@ -90,8 +90,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -268,7 +268,7 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py index e27fd01d2391..7f945ae902d5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py @@ -933,9 +933,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1019,9 +1019,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5448,9 +5448,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2019_07_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5527,9 +5527,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2019_07_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5605,7 +5605,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5616,7 +5616,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5704,7 +5704,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5715,7 +5715,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6908,7 +6908,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6928,7 +6928,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -10508,7 +10508,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -10580,7 +10580,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -10635,7 +10635,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -10646,7 +10646,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -10714,7 +10714,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -10725,7 +10725,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12870,8 +12870,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2019_07_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -12897,8 +12897,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2019_07_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py index 4f77c17c51a5..9bbad2c24b0a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5414,7 +5419,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5569,7 +5574,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5697,7 +5702,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5766,7 +5771,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5817,7 +5822,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5879,7 +5884,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5958,7 +5963,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6042,7 +6047,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6202,7 +6207,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6337,7 +6342,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6406,7 +6411,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6467,7 +6472,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6527,7 +6532,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6609,7 +6614,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6772,7 +6777,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6904,7 +6909,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6973,7 +6978,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7024,7 +7029,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7084,7 +7089,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7162,7 +7167,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7253,7 +7258,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7453,7 +7458,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7644,7 +7649,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7765,7 +7770,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7831,7 +7836,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7934,7 +7939,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7993,7 +7998,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8066,7 +8071,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8142,7 +8147,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8351,7 +8356,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8552,7 +8557,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8673,7 +8678,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8734,7 +8739,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8819,7 +8824,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8899,7 +8904,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8961,7 +8966,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9014,7 +9019,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9072,7 +9077,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9154,7 +9159,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9255,7 +9260,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9325,7 +9330,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9520,7 +9525,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9711,7 +9716,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9895,7 +9900,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10002,7 +10007,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10060,7 +10065,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10106,7 +10111,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10204,7 +10209,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10314,7 +10319,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10370,7 +10375,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10451,7 +10456,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10535,7 +10540,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10602,7 +10607,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10704,7 +10709,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10797,7 +10802,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10890,7 +10895,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10983,7 +10988,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11080,7 +11085,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11255,7 +11260,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11353,7 +11358,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11572,7 +11577,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11659,7 +11664,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11840,7 +11845,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12021,7 +12026,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12127,7 +12132,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12187,7 +12192,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12265,7 +12270,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12355,7 +12360,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12546,7 +12551,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12730,7 +12735,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12832,7 +12837,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12882,7 +12887,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13068,7 +13073,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13252,7 +13257,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13313,7 +13318,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13394,7 +13399,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13479,7 +13484,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13565,7 +13570,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13638,7 +13643,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13842,7 +13847,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14022,7 +14027,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14202,7 +14207,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14385,7 +14390,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14574,7 +14579,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14751,7 +14756,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14935,7 +14940,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15129,7 +15134,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15252,7 +15257,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15332,7 +15337,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15542,7 +15547,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15748,7 +15753,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15869,7 +15874,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15936,7 +15941,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16024,7 +16029,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16117,7 +16122,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16214,7 +16219,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16322,7 +16327,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16395,7 +16400,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16613,7 +16618,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16822,7 +16827,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16949,7 +16954,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17019,7 +17024,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17095,7 +17100,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17285,7 +17290,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17385,7 +17390,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17491,7 +17496,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17694,7 +17699,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17815,7 +17820,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17876,7 +17881,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17959,7 +17964,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18035,7 +18040,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18148,7 +18153,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18247,7 +18252,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18346,7 +18351,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18446,7 +18451,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18551,7 +18556,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18767,7 +18772,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18941,7 +18946,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19133,7 +19138,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19316,7 +19321,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19510,7 +19515,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_07_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19556,7 +19561,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19664,7 +19669,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19741,7 +19746,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19810,7 +19815,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19999,7 +20004,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20117,7 +20122,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20304,7 +20309,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20504,7 +20509,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_07_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20550,7 +20555,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20658,7 +20663,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20735,7 +20740,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20804,7 +20809,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20993,7 +20998,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21115,7 +21120,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21312,7 +21317,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21517,7 +21522,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21563,7 +21568,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21671,7 +21676,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21748,7 +21753,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21834,7 +21839,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22026,7 +22031,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22218,7 +22223,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22264,7 +22269,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22370,7 +22375,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22447,7 +22452,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22538,7 +22543,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22752,7 +22757,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22966,7 +22971,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23013,7 +23018,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23131,7 +23136,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23225,7 +23230,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23461,7 +23466,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23712,7 +23717,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23766,7 +23771,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23899,7 +23904,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23993,7 +23998,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24211,7 +24216,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24432,7 +24437,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24479,7 +24484,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24598,7 +24603,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24692,7 +24697,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24930,7 +24935,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25183,7 +25188,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25237,7 +25242,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25371,7 +25376,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25475,7 +25480,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25550,7 +25555,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py index 0c73dd8c51a6..5b130406da94 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -56,6 +57,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +88,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +271,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +465,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_11_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -506,7 +511,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -614,7 +619,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +696,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -760,7 +765,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -952,7 +957,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1072,7 +1077,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1262,7 +1267,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,7 +1470,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_11_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1511,7 +1516,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1620,7 +1625,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1767,7 +1772,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1959,7 +1964,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2083,7 +2088,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2283,7 +2288,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2493,7 +2498,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_11_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2539,7 +2544,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2652,7 +2657,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2730,7 +2735,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py index 2af0913a718a..d2a17793a1f0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -720,7 +725,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,7 +908,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1097,7 +1102,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_11_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1148,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1251,7 +1256,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1328,7 +1333,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1402,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1586,7 +1591,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1704,7 +1709,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1891,7 +1896,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2091,7 +2096,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_11_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2137,7 +2142,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2245,7 +2250,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2322,7 +2327,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2391,7 +2396,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2580,7 +2585,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2899,7 +2904,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3104,7 +3109,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2019_11_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3150,7 +3155,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3335,7 +3340,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py index 254cdd7b282c..b338b27fd6db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -190,6 +191,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -230,7 +235,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -385,7 +390,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -513,7 +518,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +587,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -633,7 +638,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -696,7 +701,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -861,7 +866,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1021,7 +1026,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1156,7 +1161,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1225,7 +1230,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1286,7 +1291,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1351,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1428,7 +1433,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1596,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1723,7 +1728,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,7 +1797,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1843,7 +1848,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1911,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1985,7 +1990,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2081,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2279,7 +2284,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2473,7 +2478,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2594,7 +2599,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2661,7 +2666,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2763,7 +2768,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2846,7 +2851,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2982,7 +2987,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3115,7 +3120,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3237,7 +3242,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3296,7 +3301,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3378,7 +3383,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3437,7 +3442,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3510,7 +3515,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3586,7 +3591,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3795,7 +3800,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3996,7 +4001,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4117,7 +4122,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4178,7 +4183,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4263,7 +4268,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4343,7 +4348,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4405,7 +4410,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4458,7 +4463,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4516,7 +4521,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4598,7 +4603,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4700,7 +4705,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4770,7 +4775,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,7 +4970,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5159,7 +5164,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5346,7 +5351,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5453,7 +5458,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5511,7 +5516,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5557,7 +5562,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5657,7 +5662,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5767,7 +5772,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5824,7 +5829,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5911,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5991,7 +5996,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6058,7 +6063,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6160,7 +6165,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6253,7 +6258,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6346,7 +6351,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6439,7 +6444,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6536,7 +6541,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6711,7 +6716,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6819,7 +6824,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6865,7 +6870,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7088,7 +7093,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7175,7 +7180,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7356,7 +7361,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7537,7 +7542,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7643,7 +7648,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7703,7 +7708,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7781,7 +7786,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7871,7 +7876,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8062,7 +8067,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8246,7 +8251,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8352,7 +8357,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8402,7 +8407,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8588,7 +8593,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8772,7 +8777,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8833,7 +8838,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8914,7 +8919,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8999,7 +9004,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9085,7 +9090,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9158,7 +9163,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9362,7 +9367,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9542,7 +9547,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9722,7 +9727,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9905,7 +9910,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10094,7 +10099,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10271,7 +10276,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10455,7 +10460,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10649,7 +10654,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10772,7 +10777,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10830,7 +10835,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11029,7 +11034,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11239,7 +11244,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11445,7 +11450,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11566,7 +11571,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11633,7 +11638,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11721,7 +11726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11816,7 +11821,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11913,7 +11918,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12021,7 +12026,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12094,7 +12099,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12312,7 +12317,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12521,7 +12526,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12648,7 +12653,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12718,7 +12723,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12794,7 +12799,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12984,7 +12989,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13084,7 +13089,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13190,7 +13195,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13393,7 +13398,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13514,7 +13519,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13575,7 +13580,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13658,7 +13663,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13734,7 +13739,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13847,7 +13852,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13946,7 +13951,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14045,7 +14050,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14145,7 +14150,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14259,7 +14264,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14307,7 +14312,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14526,7 +14531,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14701,7 +14706,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14909,7 +14914,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14984,7 +14989,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15051,7 +15056,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15246,7 +15251,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15441,7 +15446,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_12_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15487,7 +15492,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15593,7 +15598,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15670,7 +15675,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15761,7 +15766,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15975,7 +15980,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16189,7 +16194,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16236,7 +16241,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16355,7 +16360,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16449,7 +16454,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16685,7 +16690,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16936,7 +16941,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16990,7 +16995,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17123,7 +17128,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17217,7 +17222,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17435,7 +17440,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17656,7 +17661,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17703,7 +17708,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17823,7 +17828,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17917,7 +17922,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18155,7 +18160,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18408,7 +18413,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18462,7 +18467,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18596,7 +18601,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_compute_management_client_enums.py index 9d2401918144..e961ae5e7622 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_compute_management_client_enums.py @@ -74,8 +74,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -226,7 +226,7 @@ class OrchestrationServiceStateAction(str, Enum, metaclass=CaseInsensitiveEnumMe class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py index b280d92544bc..a4dd253d7e60 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py @@ -824,9 +824,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -910,9 +910,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4839,9 +4839,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2019_12_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4919,9 +4919,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2019_12_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5006,7 +5006,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5017,7 +5017,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5105,7 +5105,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5116,7 +5116,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6309,7 +6309,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6329,7 +6329,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -9793,7 +9793,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -9865,7 +9865,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -9920,7 +9920,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -9931,7 +9931,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -9999,7 +9999,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -10010,7 +10010,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12157,8 +12157,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2019_12_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -12184,8 +12184,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2019_12_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py index ea8d0d98ebd5..185a47113a10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5049,7 +5054,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5204,7 +5209,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5332,7 +5337,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5401,7 +5406,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5452,7 +5457,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5519,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5593,7 +5598,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5677,7 +5682,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5842,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5972,7 +5977,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6041,7 +6046,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6102,7 +6107,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6244,7 +6249,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6407,7 +6412,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6539,7 +6544,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6608,7 +6613,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6659,7 +6664,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6719,7 +6724,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6797,7 +6802,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6888,7 +6893,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7088,7 +7093,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7279,7 +7284,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7400,7 +7405,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7466,7 +7471,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7568,7 +7573,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7651,7 +7656,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7787,7 +7792,7 @@ def create( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7920,7 +7925,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7989,7 +7994,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8040,7 +8045,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8099,7 +8104,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8181,7 +8186,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8240,7 +8245,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8313,7 +8318,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8389,7 +8394,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8598,7 +8603,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8799,7 +8804,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8920,7 +8925,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8981,7 +8986,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9066,7 +9071,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9146,7 +9151,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9208,7 +9213,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9261,7 +9266,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9319,7 +9324,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9401,7 +9406,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,7 +9507,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9572,7 +9577,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9767,7 +9772,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9958,7 +9963,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10142,7 +10147,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10249,7 +10254,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10307,7 +10312,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10353,7 +10358,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10451,7 +10456,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10561,7 +10566,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10617,7 +10622,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10698,7 +10703,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10782,7 +10787,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10849,7 +10854,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10951,7 +10956,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11044,7 +11049,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11137,7 +11142,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11230,7 +11235,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11327,7 +11332,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11502,7 +11507,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11608,7 +11613,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11654,7 +11659,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11873,7 +11878,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11960,7 +11965,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12141,7 +12146,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12322,7 +12327,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12428,7 +12433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12488,7 +12493,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12566,7 +12571,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12656,7 +12661,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12847,7 +12852,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13031,7 +13036,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13133,7 +13138,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13183,7 +13188,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13369,7 +13374,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13553,7 +13558,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13614,7 +13619,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13695,7 +13700,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13780,7 +13785,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13866,7 +13871,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13939,7 +13944,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14143,7 +14148,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14323,7 +14328,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14503,7 +14508,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14686,7 +14691,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14875,7 +14880,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15052,7 +15057,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15236,7 +15241,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15430,7 +15435,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15553,7 +15558,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15611,7 +15616,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15810,7 +15815,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16020,7 +16025,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16226,7 +16231,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16347,7 +16352,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16414,7 +16419,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16502,7 +16507,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16595,7 +16600,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16692,7 +16697,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16800,7 +16805,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16873,7 +16878,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17091,7 +17096,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17300,7 +17305,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17427,7 +17432,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17497,7 +17502,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17573,7 +17578,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17763,7 +17768,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17863,7 +17868,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17969,7 +17974,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18172,7 +18177,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18293,7 +18298,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18354,7 +18359,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18437,7 +18442,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18513,7 +18518,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18626,7 +18631,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18725,7 +18730,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18824,7 +18829,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18924,7 +18929,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19038,7 +19043,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19086,7 +19091,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19302,7 +19307,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19476,7 +19481,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19683,7 +19688,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19758,7 +19763,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19825,7 +19830,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20017,7 +20022,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20209,7 +20214,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_12_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20255,7 +20260,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20361,7 +20366,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20438,7 +20443,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20529,7 +20534,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20743,7 +20748,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20957,7 +20962,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21004,7 +21009,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21122,7 +21127,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21216,7 +21221,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21452,7 +21457,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21703,7 +21708,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21757,7 +21762,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21890,7 +21895,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21984,7 +21989,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22202,7 +22207,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22423,7 +22428,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22470,7 +22475,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22589,7 +22594,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22683,7 +22688,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22921,7 +22926,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23174,7 +23179,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23228,7 +23233,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23362,7 +23367,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py index 17bf47541bc7..ff3252a329b9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -63,6 +64,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -90,7 +95,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +278,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +472,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_05_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -513,7 +518,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,7 +626,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -698,7 +703,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +772,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,7 +964,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1079,7 +1084,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,7 +1274,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1472,7 +1477,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_05_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1518,7 +1523,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1627,7 +1632,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1705,7 +1710,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1779,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1966,7 +1971,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2090,7 +2095,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2500,7 +2505,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2551,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2664,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2737,7 +2742,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2827,7 +2832,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3023,7 +3028,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3226,7 +3231,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3272,7 +3277,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3383,7 +3388,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3461,7 +3466,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3539,7 +3544,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_05_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py index 46fbf4693d0a..d99c1c968dd7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -935,7 +940,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1123,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1317,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_05_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1363,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,7 +1471,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,7 +1548,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1612,7 +1617,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1806,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1919,7 +1924,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2106,7 +2111,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2306,7 +2311,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_05_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2352,7 +2357,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2460,7 +2465,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2537,7 +2542,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2606,7 +2611,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2795,7 +2800,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2917,7 +2922,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3114,7 +3119,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3319,7 +3324,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3365,7 +3370,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3473,7 +3478,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3550,7 +3555,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3640,7 +3645,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3833,7 +3838,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4033,7 +4038,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4079,7 +4084,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4187,7 +4192,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4264,7 +4269,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4342,7 +4347,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_05_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py index 1c78afac2315..3b1bb175c662 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -177,6 +178,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -217,7 +222,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +377,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +505,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -569,7 +574,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +625,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -683,7 +688,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -763,7 +768,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -848,7 +853,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1008,7 +1013,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1148,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1212,7 +1217,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1273,7 +1278,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1333,7 +1338,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1415,7 +1420,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1578,7 +1583,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1710,7 +1715,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1779,7 +1784,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1846,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1905,7 +1910,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1984,7 +1989,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2080,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2278,7 +2283,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2472,7 +2477,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2593,7 +2598,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2665,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2762,7 +2767,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2845,7 +2850,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3114,7 +3119,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3183,7 +3188,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3236,7 +3241,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3295,7 +3300,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3377,7 +3382,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3436,7 +3441,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3514,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3585,7 +3590,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3794,7 +3799,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3995,7 +4000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4116,7 +4121,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4177,7 +4182,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4262,7 +4267,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4342,7 +4347,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4404,7 +4409,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4457,7 +4462,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4515,7 +4520,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4597,7 +4602,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4699,7 +4704,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4769,7 +4774,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4964,7 +4969,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5158,7 +5163,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5345,7 +5350,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5459,7 +5464,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5517,7 +5522,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5563,7 +5568,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5659,7 +5664,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5769,7 +5774,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5826,7 +5831,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5908,7 +5913,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5993,7 +5998,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6060,7 +6065,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6255,7 +6260,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6348,7 +6353,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6441,7 +6446,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6538,7 +6543,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6734,7 +6739,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6781,7 +6786,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6887,7 +6892,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6929,7 +6934,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7042,7 +7047,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7265,7 +7270,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7352,7 +7357,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7533,7 +7538,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7714,7 +7719,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7820,7 +7825,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7880,7 +7885,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7958,7 +7963,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8048,7 +8053,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8239,7 +8244,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8423,7 +8428,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8529,7 +8534,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8579,7 +8584,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8765,7 +8770,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8949,7 +8954,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9010,7 +9015,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9091,7 +9096,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9176,7 +9181,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9262,7 +9267,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9335,7 +9340,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9539,7 +9544,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9719,7 +9724,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9899,7 +9904,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10082,7 +10087,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10271,7 +10276,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10448,7 +10453,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10632,7 +10637,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10826,7 +10831,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2020_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10949,7 +10954,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11007,7 +11012,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11206,7 +11211,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11416,7 +11421,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11622,7 +11627,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11743,7 +11748,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11810,7 +11815,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11898,7 +11903,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11993,7 +11998,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12090,7 +12095,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12198,7 +12203,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12271,7 +12276,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12490,7 +12495,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12700,7 +12705,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12827,7 +12832,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12897,7 +12902,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12973,7 +12978,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13163,7 +13168,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13263,7 +13268,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13369,7 +13374,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13572,7 +13577,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13693,7 +13698,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13754,7 +13759,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13837,7 +13842,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13913,7 +13918,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14026,7 +14031,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14125,7 +14130,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14224,7 +14229,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14349,7 +14354,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14397,7 +14402,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14509,7 +14514,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14557,7 +14562,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14776,7 +14781,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14951,7 +14956,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15159,7 +15164,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15234,7 +15239,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2020_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15285,7 +15290,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15493,7 +15498,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15693,7 +15698,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15814,7 +15819,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15883,7 +15888,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15978,7 +15983,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16195,7 +16200,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16403,7 +16408,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16530,7 +16535,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16608,7 +16613,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py index 27fffbf0cbc1..132dcbdeab76 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py @@ -65,8 +65,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -210,7 +210,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py index 399349bca8f5..305f8401ce70 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py @@ -896,9 +896,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -982,9 +982,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3360,9 +3360,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2020_06_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3440,9 +3440,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2020_06_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -3518,7 +3518,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3529,7 +3529,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -3618,7 +3618,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -3629,7 +3629,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4797,7 +4797,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -4817,7 +4817,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -8783,7 +8783,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -8855,7 +8855,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -8910,7 +8910,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -8921,7 +8921,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -8989,7 +8989,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -9000,7 +9000,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -11558,8 +11558,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2020_06_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -11585,8 +11585,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2020_06_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py index d1a387772748..58bfcb3ddd0a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -4643,7 +4648,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4798,7 +4803,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4926,7 +4931,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4995,7 +5000,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5046,7 +5051,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5108,7 +5113,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5187,7 +5192,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5271,7 +5276,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5431,7 +5436,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5566,7 +5571,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5635,7 +5640,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5696,7 +5701,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5756,7 +5761,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5838,7 +5843,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6001,7 +6006,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6133,7 +6138,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6202,7 +6207,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6264,7 +6269,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6325,7 +6330,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6403,7 +6408,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6494,7 +6499,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6694,7 +6699,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6885,7 +6890,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7006,7 +7011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7072,7 +7077,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7174,7 +7179,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7257,7 +7262,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7393,7 +7398,7 @@ def create( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7526,7 +7531,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7595,7 +7600,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7646,7 +7651,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7705,7 +7710,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7787,7 +7792,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7846,7 +7851,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7919,7 +7924,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7995,7 +8000,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8204,7 +8209,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8405,7 +8410,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8526,7 +8531,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8587,7 +8592,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8672,7 +8677,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8752,7 +8757,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8814,7 +8819,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8867,7 +8872,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8925,7 +8930,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9007,7 +9012,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9108,7 +9113,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9178,7 +9183,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9373,7 +9378,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9564,7 +9569,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9748,7 +9753,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9862,7 +9867,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9920,7 +9925,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9966,7 +9971,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10060,7 +10065,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10170,7 +10175,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10226,7 +10231,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10307,7 +10312,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10391,7 +10396,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10458,7 +10463,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10560,7 +10565,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10653,7 +10658,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10746,7 +10751,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10839,7 +10844,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10936,7 +10941,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11132,7 +11137,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11179,7 +11184,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11283,7 +11288,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11325,7 +11330,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11438,7 +11443,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11657,7 +11662,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11744,7 +11749,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11925,7 +11930,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12106,7 +12111,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12212,7 +12217,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12272,7 +12277,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12350,7 +12355,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12440,7 +12445,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12631,7 +12636,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12815,7 +12820,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12917,7 +12922,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12967,7 +12972,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13153,7 +13158,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13337,7 +13342,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13398,7 +13403,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13479,7 +13484,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13564,7 +13569,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13650,7 +13655,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13723,7 +13728,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13927,7 +13932,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14107,7 +14112,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14287,7 +14292,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14470,7 +14475,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14659,7 +14664,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14836,7 +14841,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15020,7 +15025,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15214,7 +15219,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2020_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15337,7 +15342,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15395,7 +15400,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15594,7 +15599,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15804,7 +15809,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16010,7 +16015,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16131,7 +16136,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16198,7 +16203,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16286,7 +16291,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16379,7 +16384,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16476,7 +16481,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16584,7 +16589,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16657,7 +16662,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16876,7 +16881,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17086,7 +17091,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17213,7 +17218,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17283,7 +17288,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17359,7 +17364,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17549,7 +17554,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17649,7 +17654,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17755,7 +17760,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17958,7 +17963,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18079,7 +18084,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18140,7 +18145,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18223,7 +18228,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18299,7 +18304,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18412,7 +18417,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18511,7 +18516,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18610,7 +18615,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18735,7 +18740,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18783,7 +18788,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18895,7 +18900,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18943,7 +18948,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19159,7 +19164,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19333,7 +19338,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19540,7 +19545,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19615,7 +19620,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2020_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19666,7 +19671,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19874,7 +19879,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20074,7 +20079,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20195,7 +20200,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20264,7 +20269,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20359,7 +20364,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20576,7 +20581,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20784,7 +20789,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20911,7 +20916,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20989,7 +20994,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py index 39d1e0627a09..d5f835c1d500 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -64,6 +65,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +279,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +473,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_06_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -514,7 +519,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -622,7 +627,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +704,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -768,7 +773,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -960,7 +965,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1080,7 +1085,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1270,7 +1275,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1473,7 +1478,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_06_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1519,7 +1524,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1628,7 +1633,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1706,7 +1711,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1775,7 +1780,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1967,7 +1972,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2091,7 +2096,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2291,7 +2296,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2501,7 +2506,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2547,7 +2552,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2665,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2738,7 +2743,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2822,7 +2827,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2914,7 +2919,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3110,7 +3115,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3313,7 +3318,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3359,7 +3364,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3470,7 +3475,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3548,7 +3553,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3626,7 +3631,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_06_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py index 10042ac5692d..ac122fdcb681 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -966,7 +971,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1149,7 +1154,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1343,7 +1348,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_06_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1389,7 +1394,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1497,7 +1502,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1574,7 +1579,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1643,7 +1648,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1832,7 +1837,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1950,7 +1955,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2137,7 +2142,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2342,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_06_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2383,7 +2388,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2491,7 +2496,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2568,7 +2573,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2637,7 +2642,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2826,7 +2831,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2948,7 +2953,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3145,7 +3150,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3350,7 +3355,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3396,7 +3401,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3581,7 +3586,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3665,7 +3670,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3757,7 +3762,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3950,7 +3955,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4150,7 +4155,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4196,7 +4201,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4304,7 +4309,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4381,7 +4386,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4459,7 +4464,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_06_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py index b663bfb296d1..3c9386a0f24e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -103,6 +104,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +135,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +318,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,7 +512,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +558,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -661,7 +666,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -738,7 +743,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -807,7 +812,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -999,7 +1004,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1124,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1309,7 +1314,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1512,7 +1517,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1558,7 +1563,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1672,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,7 +1750,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1814,7 +1819,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2006,7 +2011,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2130,7 +2135,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2330,7 +2335,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2540,7 +2545,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2586,7 +2591,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2699,7 +2704,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2777,7 +2782,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2861,7 +2866,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2953,7 +2958,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3149,7 +3154,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3352,7 +3357,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3398,7 +3403,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3514,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3587,7 +3592,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3665,7 +3670,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3716,7 +3721,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3943,7 +3948,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3990,7 +3995,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4112,7 +4117,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4226,7 +4231,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4298,7 +4303,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4387,7 +4392,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4582,7 +4587,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4787,7 +4792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4834,7 +4839,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4940,7 +4945,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5017,7 +5022,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5108,7 +5113,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5322,7 +5327,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5536,7 +5541,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5583,7 +5588,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5702,7 +5707,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5796,7 +5801,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6032,7 +6037,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6283,7 +6288,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6337,7 +6342,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6470,7 +6475,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6564,7 +6569,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6782,7 +6787,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7003,7 +7008,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7050,7 +7055,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7170,7 +7175,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7264,7 +7269,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7502,7 +7507,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7755,7 +7760,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7809,7 +7814,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7943,7 +7948,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8036,7 +8041,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8263,7 +8268,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8339,7 +8344,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8432,7 +8437,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8514,7 +8519,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8613,7 +8618,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8706,7 +8711,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py index 45636b74579c..cc4c27f842b8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -2358,7 +2363,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2541,7 +2546,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2740,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2781,7 +2786,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2889,7 +2894,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2966,7 +2971,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3035,7 +3040,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3224,7 +3229,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3342,7 +3347,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3529,7 +3534,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3729,7 +3734,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3775,7 +3780,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3883,7 +3888,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3960,7 +3965,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +4034,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4218,7 +4223,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4340,7 +4345,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4537,7 +4542,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4742,7 +4747,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4788,7 +4793,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4896,7 +4901,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4973,7 +4978,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5057,7 +5062,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5149,7 +5154,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5342,7 +5347,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5542,7 +5547,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5588,7 +5593,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5696,7 +5701,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5773,7 +5778,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5851,7 +5856,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5902,7 +5907,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6129,7 +6134,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6176,7 +6181,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6298,7 +6303,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6412,7 +6417,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6483,7 +6488,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6572,7 +6577,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6764,7 +6769,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6966,7 +6971,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7013,7 +7018,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7119,7 +7124,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7196,7 +7201,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7287,7 +7292,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7501,7 +7506,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7715,7 +7720,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7762,7 +7767,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7880,7 +7885,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7974,7 +7979,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8210,7 +8215,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8461,7 +8466,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8515,7 +8520,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8648,7 +8653,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8742,7 +8747,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8960,7 +8965,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9181,7 +9186,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9228,7 +9233,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9347,7 +9352,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9441,7 +9446,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9679,7 +9684,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9932,7 +9937,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9986,7 +9991,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10120,7 +10125,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10213,7 +10218,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10436,7 +10441,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10512,7 +10517,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10604,7 +10609,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10686,7 +10691,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10785,7 +10790,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10878,7 +10883,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py index adf38d0c890d..87e631f3db2d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py @@ -7,6 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase +import sys from typing import ( Any, AsyncIterable, @@ -16,6 +17,7 @@ IO, Literal, Optional, + Type, TypeVar, Union, cast, @@ -73,6 +75,10 @@ build_cloud_services_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +106,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +231,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +294,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +373,7 @@ def list( ) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -435,7 +441,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +545,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +649,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,7 +767,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,7 +850,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,7 +920,7 @@ def list( ) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1006,7 +1012,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1207,7 +1213,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1398,7 +1404,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1506,7 +1512,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1565,7 +1571,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1629,7 +1635,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1712,7 +1718,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1778,7 +1784,7 @@ async def get_next(next_link=None): async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1877,7 +1883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1981,7 +1987,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2161,7 +2167,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2344,7 +2350,7 @@ async def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2530,7 +2536,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2732,7 +2738,7 @@ async def _walk_update_domain_initial( # pylint: disable=inconsistent-return-st parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2942,7 +2948,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3011,7 +3017,7 @@ def list_update_domains( ) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_compute_management_client_enums.py index cab3bca2bafc..c47f3f2eae55 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_compute_management_client_enums.py @@ -14,8 +14,8 @@ class CloudServiceUpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py index d4e8a175277a..299197e5fc9c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py @@ -475,8 +475,8 @@ class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many- :ivar upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". @@ -553,8 +553,8 @@ def __init__( :keyword upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py index a25af517d046..7f22ef86ef7f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -904,7 +909,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1029,7 +1034,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1171,7 +1176,7 @@ def list( ) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,7 +1244,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1343,7 +1348,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1447,7 +1452,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1565,7 +1570,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1718,7 +1723,7 @@ def list( ) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1815,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2011,7 +2016,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2202,7 +2207,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2308,7 +2313,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2367,7 +2372,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2431,7 +2436,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2514,7 +2519,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2580,7 +2585,7 @@ def get_next(next_link=None): def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2682,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2779,7 +2784,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2959,7 +2964,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3142,7 +3147,7 @@ def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3530,7 +3535,7 @@ def _walk_update_domain_initial( # pylint: disable=inconsistent-return-statemen parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3740,7 +3745,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3809,7 +3814,7 @@ def list_update_domains( ) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py index deb5c60e8af0..08b4349ea9f7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -222,6 +223,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -249,7 +254,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -432,7 +437,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,7 +631,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,7 +677,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -780,7 +785,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +862,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -926,7 +931,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1123,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1238,7 +1243,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1428,7 +1433,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1631,7 +1636,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1677,7 +1682,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1786,7 +1791,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1864,7 +1869,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1933,7 +1938,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2130,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2249,7 +2254,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2449,7 +2454,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2664,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2705,7 +2710,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2818,7 +2823,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2896,7 +2901,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2980,7 +2985,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3072,7 +3077,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3268,7 +3273,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3471,7 +3476,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3517,7 +3522,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3628,7 +3633,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3706,7 +3711,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3784,7 +3789,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3835,7 +3840,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4062,7 +4067,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4109,7 +4114,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4236,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4345,7 +4350,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4417,7 +4422,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4491,7 +4496,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4722,7 +4727,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4872,7 +4877,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5027,7 +5032,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5155,7 +5160,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5224,7 +5229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5275,7 +5280,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5338,7 +5343,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5418,7 +5423,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5503,7 +5508,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5663,7 +5668,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5798,7 +5803,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5867,7 +5872,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5928,7 +5933,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5993,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6070,7 +6075,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6233,7 +6238,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6365,7 +6370,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6434,7 +6439,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6496,7 +6501,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6560,7 +6565,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6639,7 +6644,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6730,7 +6735,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6933,7 +6938,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7127,7 +7132,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7248,7 +7253,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7315,7 +7320,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7417,7 +7422,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7500,7 +7505,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7636,7 +7641,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7769,7 +7774,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7838,7 +7843,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7891,7 +7896,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7950,7 +7955,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8032,7 +8037,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8091,7 +8096,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8164,7 +8169,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8240,7 +8245,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8449,7 +8454,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8650,7 +8655,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8771,7 +8776,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8832,7 +8837,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8917,7 +8922,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8997,7 +9002,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9059,7 +9064,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9112,7 +9117,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9170,7 +9175,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9257,7 +9262,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9343,7 +9348,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9409,7 +9414,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9467,7 +9472,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9529,7 +9534,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9612,7 +9617,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9714,7 +9719,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9784,7 +9789,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9979,7 +9984,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10173,7 +10178,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10356,7 +10361,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10470,7 +10475,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10528,7 +10533,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10574,7 +10579,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10670,7 +10675,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10780,7 +10785,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10837,7 +10842,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10919,7 +10924,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11004,7 +11009,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11071,7 +11076,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11173,7 +11178,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11266,7 +11271,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11359,7 +11364,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11452,7 +11457,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11549,7 +11554,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11745,7 +11750,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11792,7 +11797,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11898,7 +11903,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11940,7 +11945,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12053,7 +12058,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12248,7 +12253,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12472,7 +12477,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12542,7 +12547,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12733,7 +12738,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12917,7 +12922,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13028,7 +13033,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13078,7 +13083,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13266,7 +13271,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13465,7 +13470,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13526,7 +13531,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13607,7 +13612,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13692,7 +13697,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13778,7 +13783,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13851,7 +13856,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14055,7 +14060,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14235,7 +14240,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14415,7 +14420,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14598,7 +14603,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14787,7 +14792,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14964,7 +14969,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15148,7 +15153,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15342,7 +15347,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2020_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15465,7 +15470,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15523,7 +15528,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15732,7 +15737,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15819,7 +15824,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16000,7 +16005,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16181,7 +16186,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16287,7 +16292,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16347,7 +16352,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16425,7 +16430,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16516,7 +16521,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16726,7 +16731,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16932,7 +16937,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17053,7 +17058,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17120,7 +17125,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17208,7 +17213,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17303,7 +17308,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17400,7 +17405,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17508,7 +17513,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17581,7 +17586,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17800,7 +17805,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18010,7 +18015,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18137,7 +18142,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18207,7 +18212,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18283,7 +18288,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18473,7 +18478,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18573,7 +18578,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18679,7 +18684,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18888,7 +18893,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19020,7 +19025,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19081,7 +19086,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19164,7 +19169,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19240,7 +19245,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19353,7 +19358,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19452,7 +19457,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19551,7 +19556,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19676,7 +19681,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19724,7 +19729,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19836,7 +19841,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19884,7 +19889,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20103,7 +20108,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20278,7 +20283,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20486,7 +20491,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20561,7 +20566,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2020_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20612,7 +20617,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20820,7 +20825,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21020,7 +21025,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21141,7 +21146,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21210,7 +21215,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21305,7 +21310,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21522,7 +21527,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21730,7 +21735,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21857,7 +21862,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21935,7 +21940,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py index fa6ef3131ce4..da5a1e84a43a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_compute_management_client_enums.py @@ -96,8 +96,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -389,7 +389,7 @@ class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiv class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py index bf6535020929..e689dc6872ca 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py @@ -1025,9 +1025,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1124,9 +1124,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5069,9 +5069,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2020_12_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5149,9 +5149,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2020_12_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5227,7 +5227,7 @@ class OSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5238,7 +5238,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5327,7 +5327,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -5338,7 +5338,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6986,7 +6986,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7006,7 +7006,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -11663,7 +11663,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11735,7 +11735,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11790,7 +11790,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): :code:`
    `:code:`
    ` **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -11801,7 +11801,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -11869,7 +11869,7 @@ def __init__( **Max-length (Linux):** 64 characters :code:`
    `:code:`
    ` **Max-length (Windows):** 20 characters :code:`
    `:code:`
    `:code:`
  • ` For root access to the Linux VM, see `Using root privileges on Linux virtual machines in Azure - `_\ # pylint: disable=line-too-long + `_\\ # pylint: disable=line-too-long :code:`
    `:code:`
  • ` For a list of built-in system users on Linux that should not be used in this field, see `Selecting User Names for Linux on Azure `_. # pylint: disable=line-too-long @@ -11880,7 +11880,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -14522,8 +14522,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2020_12_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -14549,8 +14549,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2020_12_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py index 89dd9cfb6387..e80b0bc1db3d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Literal, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6117,7 +6122,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6300,7 +6305,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6494,7 +6499,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6540,7 +6545,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6648,7 +6653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6725,7 +6730,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6794,7 +6799,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6983,7 +6988,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7101,7 +7106,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7288,7 +7293,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7488,7 +7493,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7534,7 +7539,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7642,7 +7647,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7719,7 +7724,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7788,7 +7793,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7977,7 +7982,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8099,7 +8104,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8296,7 +8301,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8501,7 +8506,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8547,7 +8552,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8655,7 +8660,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8732,7 +8737,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8816,7 +8821,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8908,7 +8913,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9101,7 +9106,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9301,7 +9306,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9347,7 +9352,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9455,7 +9460,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9532,7 +9537,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9610,7 +9615,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9661,7 +9666,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9888,7 +9893,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9935,7 +9940,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10057,7 +10062,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10171,7 +10176,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10242,7 +10247,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10316,7 +10321,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10544,7 +10549,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10694,7 +10699,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10849,7 +10854,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10977,7 +10982,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11046,7 +11051,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11097,7 +11102,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11164,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11238,7 +11243,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11322,7 +11327,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11482,7 +11487,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11617,7 +11622,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11686,7 +11691,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11747,7 +11752,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11807,7 +11812,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11889,7 +11894,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12052,7 +12057,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12184,7 +12189,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12253,7 +12258,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12315,7 +12320,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12376,7 +12381,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12454,7 +12459,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12545,7 +12550,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12745,7 +12750,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12936,7 +12941,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13057,7 +13062,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13123,7 +13128,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13225,7 +13230,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13308,7 +13313,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13444,7 +13449,7 @@ def create( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13577,7 +13582,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13646,7 +13651,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13697,7 +13702,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13756,7 +13761,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13838,7 +13843,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13897,7 +13902,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13970,7 +13975,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14046,7 +14051,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14255,7 +14260,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14456,7 +14461,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14577,7 +14582,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14638,7 +14643,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14723,7 +14728,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14803,7 +14808,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14865,7 +14870,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14918,7 +14923,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14976,7 +14981,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15063,7 +15068,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15149,7 +15154,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15215,7 +15220,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15273,7 +15278,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15335,7 +15340,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15418,7 +15423,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15519,7 +15524,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15589,7 +15594,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15784,7 +15789,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15975,7 +15980,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16155,7 +16160,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16269,7 +16274,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16327,7 +16332,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16373,7 +16378,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16467,7 +16472,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16577,7 +16582,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16633,7 +16638,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16714,7 +16719,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16798,7 +16803,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16865,7 +16870,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16967,7 +16972,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17060,7 +17065,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17153,7 +17158,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17246,7 +17251,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17343,7 +17348,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17539,7 +17544,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17586,7 +17591,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17690,7 +17695,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17732,7 +17737,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17845,7 +17850,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18040,7 +18045,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18261,7 +18266,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18331,7 +18336,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18522,7 +18527,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18706,7 +18711,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18815,7 +18820,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18865,7 +18870,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19053,7 +19058,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19252,7 +19257,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19313,7 +19318,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19394,7 +19399,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19479,7 +19484,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19565,7 +19570,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19638,7 +19643,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19842,7 +19847,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20022,7 +20027,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20202,7 +20207,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20385,7 +20390,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20574,7 +20579,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20751,7 +20756,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20935,7 +20940,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21129,7 +21134,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2020_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21252,7 +21257,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21310,7 +21315,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21518,7 +21523,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21605,7 +21610,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21786,7 +21791,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21967,7 +21972,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22073,7 +22078,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22133,7 +22138,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22211,7 +22216,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22302,7 +22307,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22512,7 +22517,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22718,7 +22723,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22839,7 +22844,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22906,7 +22911,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22994,7 +22999,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23087,7 +23092,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23184,7 +23189,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23292,7 +23297,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23365,7 +23370,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23584,7 +23589,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23794,7 +23799,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23921,7 +23926,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23991,7 +23996,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24067,7 +24072,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24257,7 +24262,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24357,7 +24362,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24463,7 +24468,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24672,7 +24677,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24804,7 +24809,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24865,7 +24870,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24948,7 +24953,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25024,7 +25029,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25137,7 +25142,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25236,7 +25241,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25335,7 +25340,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25460,7 +25465,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25508,7 +25513,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25620,7 +25625,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25668,7 +25673,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25884,7 +25889,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26058,7 +26063,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26265,7 +26270,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26340,7 +26345,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2020_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26391,7 +26396,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26599,7 +26604,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26799,7 +26804,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26920,7 +26925,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26989,7 +26994,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27084,7 +27089,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27301,7 +27306,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27509,7 +27514,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27636,7 +27641,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27714,7 +27719,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py index fa4c3ce73d94..9e836536ee09 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py @@ -7,7 +7,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import ( + Any, + AsyncIterable, + AsyncIterator, + Callable, + Dict, + IO, + List, + Optional, + Type, + TypeVar, + Union, + cast, + overload, +) import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -223,6 +238,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -250,7 +269,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +390,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -432,7 +451,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,7 +526,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +594,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -675,7 +694,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +794,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -889,7 +908,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -970,7 +989,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1055,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1128,7 +1147,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1322,7 +1341,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1505,7 +1524,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1609,7 +1628,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1666,7 +1685,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1745,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1807,7 +1826,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1873,7 +1892,7 @@ async def get_next(next_link=None): async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1968,7 +1987,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2068,7 +2087,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2244,7 +2263,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2423,7 +2442,7 @@ async def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2605,7 +2624,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2803,7 +2822,7 @@ async def _walk_update_domain_initial( # pylint: disable=inconsistent-return-st parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3009,7 +3028,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2021_03_01.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3093,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3172,7 +3191,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3234,7 +3253,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3310,7 +3329,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3372,7 +3391,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3472,7 +3491,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3627,7 +3646,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3755,7 +3774,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3824,7 +3843,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3875,7 +3894,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3957,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4018,7 +4037,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4103,7 +4122,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4263,7 +4282,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4398,7 +4417,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4467,7 +4486,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4547,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4588,7 +4607,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4670,7 +4689,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4833,7 +4852,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,7 +4984,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5034,7 +5053,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5097,7 +5116,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5161,7 +5180,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5240,7 +5259,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5331,7 +5350,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5534,7 +5553,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5728,7 +5747,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5850,7 +5869,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5917,7 +5936,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6019,7 +6038,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6102,7 +6121,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6238,7 +6257,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6371,7 +6390,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6440,7 +6459,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6493,7 +6512,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6552,7 +6571,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6634,7 +6653,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6693,7 +6712,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6766,7 +6785,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6861,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7051,7 +7070,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7252,7 +7271,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7373,7 +7392,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7434,7 +7453,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7519,7 +7538,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7599,7 +7618,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7661,7 +7680,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7714,7 +7733,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7772,7 +7791,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7859,7 +7878,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7946,7 +7965,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8013,7 +8032,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8072,7 +8091,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8135,7 +8154,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8219,7 +8238,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8321,7 +8340,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8391,7 +8410,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8586,7 +8605,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8780,7 +8799,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8963,7 +8982,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9085,7 +9104,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9143,7 +9162,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9189,7 +9208,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9285,7 +9304,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9395,7 +9414,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9452,7 +9471,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9534,7 +9553,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9619,7 +9638,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9686,7 +9705,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9788,7 +9807,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9882,7 +9901,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9975,7 +9994,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10068,7 +10087,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10165,7 +10184,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10361,7 +10380,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10409,7 +10428,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10515,7 +10534,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10557,7 +10576,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10671,7 +10690,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10867,7 +10886,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11091,7 +11110,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11162,7 +11181,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11353,7 +11372,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11537,7 +11556,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11657,7 +11676,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11708,7 +11727,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11896,7 +11915,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12095,7 +12114,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12156,7 +12175,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12237,7 +12256,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12322,7 +12341,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12408,7 +12427,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12481,7 +12500,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12685,7 +12704,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12865,7 +12884,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13045,7 +13064,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13228,7 +13247,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13417,7 +13436,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13594,7 +13613,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13778,7 +13797,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13972,7 +13991,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14095,7 +14114,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14153,7 +14172,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14362,7 +14381,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14449,7 +14468,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14630,7 +14649,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14811,7 +14830,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14917,7 +14936,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14977,7 +14996,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15055,7 +15074,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15219,7 +15238,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15355,7 +15374,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15414,7 +15433,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15532,7 +15551,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15595,7 +15614,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15677,7 +15696,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15769,7 +15788,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15964,7 +15983,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16077,7 +16096,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16151,7 +16170,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16361,7 +16380,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16567,7 +16586,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16688,7 +16707,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16755,7 +16774,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16843,7 +16862,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16938,7 +16957,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17035,7 +17054,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17143,7 +17162,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17216,7 +17235,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17436,7 +17455,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17647,7 +17666,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17775,7 +17794,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17846,7 +17865,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17923,7 +17942,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18113,7 +18132,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18213,7 +18232,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18319,7 +18338,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18528,7 +18547,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18661,7 +18680,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18722,7 +18741,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18805,7 +18824,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18881,7 +18900,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18994,7 +19013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19093,7 +19112,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19192,7 +19211,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19317,7 +19336,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19366,7 +19385,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19478,7 +19497,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19526,7 +19545,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19745,7 +19764,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19920,7 +19939,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20128,7 +20147,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20203,7 +20222,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20254,7 +20273,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20463,7 +20482,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20664,7 +20683,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20786,7 +20805,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20856,7 +20875,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20952,7 +20971,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21170,7 +21189,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21379,7 +21398,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21507,7 +21526,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21586,7 +21605,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py index 2e578577fd07..f2031cf04223 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_compute_management_client_enums.py @@ -35,8 +35,8 @@ class CloudServiceUpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. @@ -98,8 +98,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -337,7 +337,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py index 68fdbdd06ccb..2005b69d43a9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py @@ -1329,8 +1329,8 @@ class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many- :ivar upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". @@ -1411,8 +1411,8 @@ def __init__( :keyword upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". @@ -1855,9 +1855,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1962,9 +1962,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4793,9 +4793,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2021_03_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4883,9 +4883,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2021_03_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5086,7 +5086,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5182,7 +5182,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7482,7 +7482,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7502,7 +7502,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -12296,7 +12296,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -12368,7 +12368,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -12429,7 +12429,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12503,7 +12503,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -15245,8 +15245,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2021_03_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -15276,8 +15276,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2021_03_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py index fd5393cf0180..81b45326ea3f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6195,7 +6200,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6316,7 +6321,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6377,7 +6382,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6451,7 +6456,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6519,7 +6524,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6619,7 +6624,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6719,7 +6724,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6833,7 +6838,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6914,7 +6919,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6979,7 +6984,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7071,7 +7076,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7265,7 +7270,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7448,7 +7453,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7550,7 +7555,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7607,7 +7612,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7666,7 +7671,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7746,7 +7751,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7812,7 +7817,7 @@ def get_next(next_link=None): def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7905,7 +7910,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8003,7 +8008,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8179,7 +8184,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8358,7 +8363,7 @@ def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8540,7 +8545,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8738,7 +8743,7 @@ def _walk_update_domain_initial( # pylint: disable=inconsistent-return-statemen parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8944,7 +8949,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2021_03_01.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9008,7 +9013,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9106,7 +9111,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9167,7 +9172,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9243,7 +9248,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9304,7 +9309,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9404,7 +9409,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9559,7 +9564,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9687,7 +9692,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9756,7 +9761,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9807,7 +9812,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9869,7 +9874,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9948,7 +9953,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10032,7 +10037,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10192,7 +10197,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10327,7 +10332,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10396,7 +10401,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10457,7 +10462,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10517,7 +10522,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10599,7 +10604,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10762,7 +10767,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10894,7 +10899,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10963,7 +10968,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11026,7 +11031,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11087,7 +11092,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11165,7 +11170,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11256,7 +11261,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11456,7 +11461,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11647,7 +11652,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11769,7 +11774,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11835,7 +11840,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11937,7 +11942,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12020,7 +12025,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12156,7 +12161,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12289,7 +12294,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12358,7 +12363,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12409,7 +12414,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12468,7 +12473,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12550,7 +12555,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12609,7 +12614,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12682,7 +12687,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12758,7 +12763,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12967,7 +12972,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13168,7 +13173,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13289,7 +13294,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13350,7 +13355,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13435,7 +13440,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13515,7 +13520,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13577,7 +13582,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13630,7 +13635,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13688,7 +13693,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13775,7 +13780,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13862,7 +13867,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13929,7 +13934,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13988,7 +13993,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14051,7 +14056,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14135,7 +14140,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14236,7 +14241,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14306,7 +14311,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14506,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14692,7 +14697,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14872,7 +14877,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14994,7 +14999,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15052,7 +15057,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15098,7 +15103,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15192,7 +15197,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15302,7 +15307,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15358,7 +15363,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15439,7 +15444,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15523,7 +15528,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15590,7 +15595,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15692,7 +15697,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15786,7 +15791,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15879,7 +15884,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15972,7 +15977,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16069,7 +16074,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16265,7 +16270,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16313,7 +16318,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16417,7 +16422,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16459,7 +16464,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16573,7 +16578,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16769,7 +16774,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16990,7 +16995,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17061,7 +17066,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17252,7 +17257,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17436,7 +17441,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17556,7 +17561,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17607,7 +17612,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17795,7 +17800,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17994,7 +17999,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18055,7 +18060,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18136,7 +18141,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18221,7 +18226,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18307,7 +18312,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18380,7 +18385,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18584,7 +18589,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18764,7 +18769,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18944,7 +18949,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19127,7 +19132,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19316,7 +19321,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19493,7 +19498,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19677,7 +19682,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19871,7 +19876,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19994,7 +19999,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20052,7 +20057,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20260,7 +20265,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20347,7 +20352,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20528,7 +20533,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20709,7 +20714,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20815,7 +20820,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20875,7 +20880,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20953,7 +20958,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21117,7 +21122,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21253,7 +21258,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21312,7 +21317,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21430,7 +21435,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21493,7 +21498,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21575,7 +21580,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21667,7 +21672,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21862,7 +21867,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21975,7 +21980,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22049,7 +22054,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22259,7 +22264,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22465,7 +22470,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22586,7 +22591,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22653,7 +22658,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22741,7 +22746,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22834,7 +22839,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22931,7 +22936,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23039,7 +23044,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23112,7 +23117,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23332,7 +23337,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23543,7 +23548,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23671,7 +23676,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23742,7 +23747,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23819,7 +23824,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24009,7 +24014,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24109,7 +24114,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24215,7 +24220,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24424,7 +24429,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24557,7 +24562,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24618,7 +24623,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24701,7 +24706,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24777,7 +24782,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24890,7 +24895,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24989,7 +24994,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25088,7 +25093,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25213,7 +25218,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25262,7 +25267,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25374,7 +25379,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25422,7 +25427,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25638,7 +25643,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25812,7 +25817,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26019,7 +26024,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26094,7 +26099,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26145,7 +26150,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26354,7 +26359,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26555,7 +26560,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26677,7 +26682,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26747,7 +26752,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26843,7 +26848,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27061,7 +27066,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27270,7 +27275,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27398,7 +27403,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27477,7 +27482,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py index d77fdd0daa38..1cc4d1c4f52d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -242,6 +243,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -282,7 +287,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -437,7 +442,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -565,7 +570,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,7 +639,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -685,7 +690,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -748,7 +753,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -828,7 +833,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,7 +918,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1073,7 +1078,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1213,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1277,7 +1282,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1338,7 +1343,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1398,7 +1403,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1480,7 +1485,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1643,7 +1648,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1775,7 +1780,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1844,7 +1849,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1907,7 +1912,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1971,7 +1976,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2050,7 +2055,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2344,7 +2349,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2538,7 +2543,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2665,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2727,7 +2732,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2829,7 +2834,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3048,7 +3053,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3181,7 +3186,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3250,7 +3255,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3303,7 +3308,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3367,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3444,7 +3449,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3503,7 +3508,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,7 +3581,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3652,7 +3657,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3861,7 +3866,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4062,7 +4067,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4183,7 +4188,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4244,7 +4249,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4329,7 +4334,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4409,7 +4414,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4471,7 +4476,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4524,7 +4529,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4582,7 +4587,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4669,7 +4674,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4755,7 +4760,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4821,7 +4826,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4879,7 +4884,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4941,7 +4946,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5024,7 +5029,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5126,7 +5131,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5196,7 +5201,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5391,7 +5396,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5585,7 +5590,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5768,7 +5773,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5890,7 +5895,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5948,7 +5953,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5994,7 +5999,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6090,7 +6095,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6200,7 +6205,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6257,7 +6262,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6339,7 +6344,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6424,7 +6429,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6491,7 +6496,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6593,7 +6598,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6686,7 +6691,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6779,7 +6784,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6872,7 +6877,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6969,7 +6974,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7165,7 +7170,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7212,7 +7217,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7318,7 +7323,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7360,7 +7365,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7473,7 +7478,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7668,7 +7673,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7892,7 +7897,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7962,7 +7967,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8153,7 +8158,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8337,7 +8342,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8457,7 +8462,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8508,7 +8513,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8696,7 +8701,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8895,7 +8900,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8956,7 +8961,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9037,7 +9042,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9122,7 +9127,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9208,7 +9213,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9281,7 +9286,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9485,7 +9490,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9665,7 +9670,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9845,7 +9850,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10028,7 +10033,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10217,7 +10222,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10394,7 +10399,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10578,7 +10583,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10772,7 +10777,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10895,7 +10900,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10953,7 +10958,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11162,7 +11167,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11249,7 +11254,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11430,7 +11435,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11611,7 +11616,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11717,7 +11722,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11777,7 +11782,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11855,7 +11860,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12019,7 +12024,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12154,7 +12159,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12212,7 +12217,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12329,7 +12334,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12391,7 +12396,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12472,7 +12477,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12563,7 +12568,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12757,7 +12762,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12869,7 +12874,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13013,7 +13018,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13151,7 +13156,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13223,7 +13228,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13288,7 +13293,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13363,7 +13368,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13452,7 +13457,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13544,7 +13549,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13753,7 +13758,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13953,7 +13958,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14082,7 +14087,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14149,7 +14154,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14242,7 +14247,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14452,7 +14457,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14658,7 +14663,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14779,7 +14784,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14846,7 +14851,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14934,7 +14939,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15029,7 +15034,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15126,7 +15131,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15234,7 +15239,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15307,7 +15312,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15526,7 +15531,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15736,7 +15741,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15863,7 +15868,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15933,7 +15938,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16009,7 +16014,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16199,7 +16204,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16299,7 +16304,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16405,7 +16410,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16614,7 +16619,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16747,7 +16752,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16808,7 +16813,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16891,7 +16896,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16967,7 +16972,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17080,7 +17085,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17179,7 +17184,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17278,7 +17283,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17403,7 +17408,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17451,7 +17456,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17563,7 +17568,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17611,7 +17616,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17830,7 +17835,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18005,7 +18010,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18213,7 +18218,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18288,7 +18293,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18339,7 +18344,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18547,7 +18552,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18747,7 +18752,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18868,7 +18873,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18937,7 +18942,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19032,7 +19037,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19249,7 +19254,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19457,7 +19462,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19584,7 +19589,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19662,7 +19667,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19752,7 +19757,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19935,7 +19940,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20129,7 +20134,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20175,7 +20180,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20283,7 +20288,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20360,7 +20365,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20429,7 +20434,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20621,7 +20626,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20741,7 +20746,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20931,7 +20936,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21134,7 +21139,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21180,7 +21185,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21289,7 +21294,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21367,7 +21372,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21436,7 +21441,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21628,7 +21633,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21752,7 +21757,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21952,7 +21957,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22162,7 +22167,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22208,7 +22213,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22321,7 +22326,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22399,7 +22404,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22483,7 +22488,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22575,7 +22580,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22771,7 +22776,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22974,7 +22979,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23020,7 +23025,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23131,7 +23136,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23209,7 +23214,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23287,7 +23292,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23338,7 +23343,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23565,7 +23570,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23612,7 +23617,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23734,7 +23739,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23844,7 +23849,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23914,7 +23919,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23988,7 +23993,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24207,7 +24212,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py index aa93092ed6a6..846412e31eee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py @@ -128,8 +128,8 @@ class DiskCreateOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -495,7 +495,7 @@ class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiv class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py index eb4979545bda..e470a4985629 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py @@ -1558,9 +1558,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1665,9 +1665,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5790,9 +5790,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2021_04_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5880,9 +5880,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2021_04_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -5973,7 +5973,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6069,7 +6069,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -8311,7 +8311,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -8331,7 +8331,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -13559,7 +13559,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -13631,7 +13631,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -13692,7 +13692,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -13766,7 +13766,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -16530,8 +16530,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2021_04_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -16561,8 +16561,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2021_04_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py index 81b876f30b6b..22c5fb37566e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6866,7 +6871,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7021,7 +7026,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7149,7 +7154,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7218,7 +7223,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7274,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7331,7 +7336,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7410,7 +7415,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7494,7 +7499,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7659,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7789,7 +7794,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7858,7 +7863,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7919,7 +7924,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7979,7 +7984,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8061,7 +8066,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8224,7 +8229,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8356,7 +8361,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8425,7 +8430,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8488,7 +8493,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8549,7 +8554,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8627,7 +8632,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8718,7 +8723,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8918,7 +8923,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9109,7 +9114,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9231,7 +9236,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9297,7 +9302,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9399,7 +9404,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9482,7 +9487,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9618,7 +9623,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9751,7 +9756,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9820,7 +9825,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9871,7 +9876,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9930,7 +9935,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10012,7 +10017,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10071,7 +10076,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10144,7 +10149,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10220,7 +10225,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10429,7 +10434,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10630,7 +10635,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10751,7 +10756,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10812,7 +10817,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10897,7 +10902,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10977,7 +10982,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11039,7 +11044,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11092,7 +11097,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11150,7 +11155,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11237,7 +11242,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11323,7 +11328,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11389,7 +11394,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11447,7 +11452,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11514,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11592,7 +11597,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11693,7 +11698,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11763,7 +11768,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11958,7 +11963,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12149,7 +12154,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12329,7 +12334,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12451,7 +12456,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12509,7 +12514,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12555,7 +12560,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12649,7 +12654,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12759,7 +12764,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12815,7 +12820,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12896,7 +12901,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12980,7 +12985,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13047,7 +13052,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13149,7 +13154,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13242,7 +13247,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13335,7 +13340,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13428,7 +13433,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13525,7 +13530,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13721,7 +13726,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13768,7 +13773,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13872,7 +13877,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13914,7 +13919,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14027,7 +14032,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14222,7 +14227,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14443,7 +14448,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14513,7 +14518,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14704,7 +14709,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14888,7 +14893,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15008,7 +15013,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15059,7 +15064,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15247,7 +15252,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15446,7 +15451,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15507,7 +15512,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15588,7 +15593,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15673,7 +15678,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15759,7 +15764,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15832,7 +15837,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16036,7 +16041,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16216,7 +16221,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16396,7 +16401,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16579,7 +16584,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16768,7 +16773,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16945,7 +16950,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17129,7 +17134,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17323,7 +17328,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17446,7 +17451,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17504,7 +17509,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17712,7 +17717,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17799,7 +17804,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17980,7 +17985,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18161,7 +18166,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18267,7 +18272,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18327,7 +18332,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18405,7 +18410,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18569,7 +18574,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18704,7 +18709,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18762,7 +18767,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18879,7 +18884,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18941,7 +18946,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19022,7 +19027,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19113,7 +19118,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19307,7 +19312,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19419,7 +19424,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19563,7 +19568,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19701,7 +19706,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19773,7 +19778,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19838,7 +19843,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19913,7 +19918,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20002,7 +20007,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20094,7 +20099,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20303,7 +20308,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20503,7 +20508,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20632,7 +20637,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20699,7 +20704,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20792,7 +20797,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21002,7 +21007,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21208,7 +21213,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21329,7 +21334,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21396,7 +21401,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21484,7 +21489,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21577,7 +21582,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21674,7 +21679,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21782,7 +21787,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21855,7 +21860,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22074,7 +22079,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22284,7 +22289,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22411,7 +22416,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22481,7 +22486,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22557,7 +22562,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22747,7 +22752,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22847,7 +22852,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22953,7 +22958,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23162,7 +23167,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23295,7 +23300,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23356,7 +23361,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23439,7 +23444,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23515,7 +23520,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23628,7 +23633,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23727,7 +23732,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23826,7 +23831,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23951,7 +23956,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23999,7 +24004,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24111,7 +24116,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24159,7 +24164,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24375,7 +24380,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24549,7 +24554,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24756,7 +24761,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24831,7 +24836,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24882,7 +24887,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25090,7 +25095,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25290,7 +25295,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25411,7 +25416,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25480,7 +25485,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25575,7 +25580,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25792,7 +25797,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26000,7 +26005,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26127,7 +26132,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26205,7 +26210,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26295,7 +26300,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26478,7 +26483,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26672,7 +26677,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26718,7 +26723,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26826,7 +26831,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26903,7 +26908,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26972,7 +26977,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27161,7 +27166,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27279,7 +27284,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27466,7 +27471,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27666,7 +27671,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27712,7 +27717,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27820,7 +27825,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27897,7 +27902,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27966,7 +27971,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28155,7 +28160,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28277,7 +28282,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28474,7 +28479,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28679,7 +28684,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28725,7 +28730,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28833,7 +28838,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28910,7 +28915,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28994,7 +28999,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29086,7 +29091,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29279,7 +29284,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29479,7 +29484,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29525,7 +29530,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29633,7 +29638,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29710,7 +29715,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29788,7 +29793,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29839,7 +29844,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30066,7 +30071,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30113,7 +30118,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30235,7 +30240,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30345,7 +30350,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30414,7 +30419,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30488,7 +30493,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30704,7 +30709,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py index 88fcc78f0326..d226dca64fcc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -241,6 +242,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -281,7 +286,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -436,7 +441,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +569,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -633,7 +638,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -684,7 +689,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -747,7 +752,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -827,7 +832,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -912,7 +917,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1072,7 +1077,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1207,7 +1212,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,7 +1281,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1337,7 +1342,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1402,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1479,7 +1484,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1642,7 +1647,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1779,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1843,7 +1848,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1911,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1970,7 +1975,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2049,7 +2054,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2140,7 +2145,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2537,7 +2542,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2664,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2726,7 +2731,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2828,7 +2833,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2911,7 +2916,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3047,7 +3052,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3180,7 +3185,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3249,7 +3254,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3302,7 +3307,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3361,7 +3366,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3448,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3502,7 +3507,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3575,7 +3580,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3651,7 +3656,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3860,7 +3865,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4061,7 +4066,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4182,7 +4187,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4243,7 +4248,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4328,7 +4333,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4408,7 +4413,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4470,7 +4475,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4523,7 +4528,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4586,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4668,7 +4673,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4754,7 +4759,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4825,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4878,7 +4883,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4940,7 +4945,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5023,7 +5028,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5125,7 +5130,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5195,7 +5200,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,7 +5395,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5584,7 +5589,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5767,7 +5772,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5889,7 +5894,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5947,7 +5952,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5993,7 +5998,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6089,7 +6094,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6206,7 +6211,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6263,7 +6268,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6345,7 +6350,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6430,7 +6435,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6497,7 +6502,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6599,7 +6604,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6692,7 +6697,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6785,7 +6790,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6878,7 +6883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6975,7 +6980,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7171,7 +7176,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7218,7 +7223,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7324,7 +7329,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7366,7 +7371,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7479,7 +7484,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7674,7 +7679,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7898,7 +7903,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7968,7 +7973,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8159,7 +8164,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8343,7 +8348,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8463,7 +8468,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8514,7 +8519,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8702,7 +8707,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8901,7 +8906,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8962,7 +8967,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9043,7 +9048,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9128,7 +9133,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9214,7 +9219,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9287,7 +9292,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9491,7 +9496,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9671,7 +9676,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9851,7 +9856,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10034,7 +10039,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10223,7 +10228,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10400,7 +10405,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10584,7 +10589,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10778,7 +10783,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10901,7 +10906,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10959,7 +10964,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11168,7 +11173,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11255,7 +11260,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11436,7 +11441,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11617,7 +11622,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11723,7 +11728,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11783,7 +11788,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11861,7 +11866,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12025,7 +12030,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12160,7 +12165,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12218,7 +12223,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12335,7 +12340,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12397,7 +12402,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12478,7 +12483,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12569,7 +12574,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12763,7 +12768,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12875,7 +12880,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13019,7 +13024,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13157,7 +13162,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13229,7 +13234,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13294,7 +13299,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13369,7 +13374,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13458,7 +13463,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13550,7 +13555,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13759,7 +13764,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13959,7 +13964,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14088,7 +14093,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14155,7 +14160,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14248,7 +14253,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14458,7 +14463,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14664,7 +14669,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14785,7 +14790,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14852,7 +14857,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14940,7 +14945,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15035,7 +15040,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15132,7 +15137,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15240,7 +15245,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15313,7 +15318,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15532,7 +15537,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15742,7 +15747,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15869,7 +15874,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15939,7 +15944,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16015,7 +16020,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16205,7 +16210,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16305,7 +16310,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16411,7 +16416,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16620,7 +16625,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16753,7 +16758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16814,7 +16819,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16897,7 +16902,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16973,7 +16978,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17086,7 +17091,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17185,7 +17190,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17284,7 +17289,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17409,7 +17414,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17457,7 +17462,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17569,7 +17574,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17617,7 +17622,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17836,7 +17841,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18011,7 +18016,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18219,7 +18224,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18294,7 +18299,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18345,7 +18350,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18553,7 +18558,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18753,7 +18758,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18874,7 +18879,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18943,7 +18948,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19038,7 +19043,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19255,7 +19260,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19463,7 +19468,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19590,7 +19595,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19668,7 +19673,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19778,7 +19783,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19866,7 +19871,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20061,7 +20066,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20266,7 +20271,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20313,7 +20318,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20419,7 +20424,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20496,7 +20501,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20587,7 +20592,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20801,7 +20806,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21015,7 +21020,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21062,7 +21067,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21181,7 +21186,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21275,7 +21280,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21511,7 +21516,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21762,7 +21767,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21816,7 +21821,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21949,7 +21954,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22043,7 +22048,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22261,7 +22266,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22482,7 +22487,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22529,7 +22534,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22649,7 +22654,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22743,7 +22748,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22981,7 +22986,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23234,7 +23239,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23288,7 +23293,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23422,7 +23427,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23515,7 +23520,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23742,7 +23747,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23818,7 +23823,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23911,7 +23916,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23993,7 +23998,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24092,7 +24097,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24185,7 +24190,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24263,7 +24268,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24343,7 +24348,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24434,7 +24439,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_compute_management_client_enums.py index 9bea44b200de..ce77892a613d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_compute_management_client_enums.py @@ -103,8 +103,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -423,7 +423,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py index e4df9d4f64b6..04aeb65efe64 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py @@ -1699,9 +1699,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1806,9 +1806,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2569,9 +2569,9 @@ class DiagnosticsProfile(_serialization.Model): 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :vartype boot_diagnostics: ~azure.mgmt.compute.v2021_07_01.models.BootDiagnostics @@ -2584,9 +2584,9 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :paramtype boot_diagnostics: ~azure.mgmt.compute.v2021_07_01.models.BootDiagnostics @@ -6328,9 +6328,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2021_07_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -6418,9 +6418,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2021_07_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -6520,7 +6520,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6616,7 +6616,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7426,7 +7426,7 @@ class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-at :ivar name: The name of SKU. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar size: The Size of the SKU. @@ -9474,7 +9474,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -9494,7 +9494,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -14476,7 +14476,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -14548,7 +14548,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -14609,7 +14609,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -14683,7 +14683,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -17593,8 +17593,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2021_07_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -17624,8 +17624,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2021_07_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py index a4a0d12f2d32..330c616f4cf9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6958,7 +6963,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7113,7 +7118,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7241,7 +7246,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7310,7 +7315,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7361,7 +7366,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7423,7 +7428,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7502,7 +7507,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7586,7 +7591,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7746,7 +7751,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7881,7 +7886,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7950,7 +7955,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8011,7 +8016,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8071,7 +8076,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8153,7 +8158,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8316,7 +8321,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8448,7 +8453,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8517,7 +8522,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8580,7 +8585,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8641,7 +8646,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8719,7 +8724,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8810,7 +8815,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9010,7 +9015,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9201,7 +9206,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9323,7 +9328,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9389,7 +9394,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9491,7 +9496,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9574,7 +9579,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9710,7 +9715,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9843,7 +9848,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9912,7 +9917,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9963,7 +9968,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10022,7 +10027,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10104,7 +10109,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10163,7 +10168,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10236,7 +10241,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10312,7 +10317,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10521,7 +10526,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10722,7 +10727,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10843,7 +10848,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10904,7 +10909,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10989,7 +10994,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11069,7 +11074,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11131,7 +11136,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11184,7 +11189,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11242,7 +11247,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11329,7 +11334,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11415,7 +11420,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11481,7 +11486,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11539,7 +11544,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11601,7 +11606,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11684,7 +11689,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11785,7 +11790,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11855,7 +11860,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12050,7 +12055,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12241,7 +12246,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12421,7 +12426,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12543,7 +12548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12601,7 +12606,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12647,7 +12652,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12741,7 +12746,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12858,7 +12863,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12914,7 +12919,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12995,7 +13000,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13079,7 +13084,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13146,7 +13151,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13248,7 +13253,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13341,7 +13346,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13434,7 +13439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13527,7 +13532,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13624,7 +13629,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13820,7 +13825,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13867,7 +13872,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13971,7 +13976,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14013,7 +14018,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14126,7 +14131,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14321,7 +14326,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14542,7 +14547,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14612,7 +14617,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14803,7 +14808,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14987,7 +14992,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15107,7 +15112,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15158,7 +15163,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15346,7 +15351,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15545,7 +15550,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15606,7 +15611,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15687,7 +15692,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15772,7 +15777,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15858,7 +15863,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15931,7 +15936,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16135,7 +16140,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16315,7 +16320,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16495,7 +16500,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16678,7 +16683,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16867,7 +16872,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17044,7 +17049,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17228,7 +17233,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17422,7 +17427,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17545,7 +17550,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17603,7 +17608,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17811,7 +17816,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17898,7 +17903,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18079,7 +18084,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18260,7 +18265,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18366,7 +18371,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18426,7 +18431,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18504,7 +18509,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18668,7 +18673,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18803,7 +18808,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18861,7 +18866,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18978,7 +18983,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19040,7 +19045,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19121,7 +19126,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19212,7 +19217,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19406,7 +19411,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19518,7 +19523,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19662,7 +19667,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19800,7 +19805,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19872,7 +19877,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19937,7 +19942,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20012,7 +20017,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20101,7 +20106,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20193,7 +20198,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20402,7 +20407,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20602,7 +20607,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20731,7 +20736,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20798,7 +20803,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20891,7 +20896,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21101,7 +21106,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21307,7 +21312,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21428,7 +21433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21495,7 +21500,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21583,7 +21588,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21676,7 +21681,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21773,7 +21778,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21881,7 +21886,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21954,7 +21959,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22173,7 +22178,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22383,7 +22388,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22510,7 +22515,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22580,7 +22585,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22656,7 +22661,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22846,7 +22851,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22946,7 +22951,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23052,7 +23057,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23261,7 +23266,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23394,7 +23399,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23455,7 +23460,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23538,7 +23543,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23614,7 +23619,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23727,7 +23732,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23826,7 +23831,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23925,7 +23930,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24050,7 +24055,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24098,7 +24103,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24210,7 +24215,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24258,7 +24263,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24474,7 +24479,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24648,7 +24653,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24855,7 +24860,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24930,7 +24935,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24981,7 +24986,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25189,7 +25194,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25389,7 +25394,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25510,7 +25515,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25579,7 +25584,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25674,7 +25679,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25891,7 +25896,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26099,7 +26104,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26226,7 +26231,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26304,7 +26309,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26413,7 +26418,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26501,7 +26506,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26693,7 +26698,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26895,7 +26900,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26942,7 +26947,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27048,7 +27053,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27125,7 +27130,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27216,7 +27221,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27430,7 +27435,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27644,7 +27649,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27691,7 +27696,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27809,7 +27814,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27903,7 +27908,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28139,7 +28144,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28390,7 +28395,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28444,7 +28449,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28577,7 +28582,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28671,7 +28676,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28889,7 +28894,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29110,7 +29115,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29157,7 +29162,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29276,7 +29281,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29370,7 +29375,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29608,7 +29613,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29861,7 +29866,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29915,7 +29920,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30049,7 +30054,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30142,7 +30147,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30365,7 +30370,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30441,7 +30446,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30533,7 +30538,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30615,7 +30620,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30714,7 +30719,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30807,7 +30812,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30885,7 +30890,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30965,7 +30970,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31056,7 +31061,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py index e94d68d70901..cce73349d346 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_08_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1088,7 +1093,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1278,7 +1283,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_08_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1641,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1719,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1783,7 +1788,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1975,7 +1980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2099,7 +2104,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2299,7 +2304,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2509,7 +2514,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2555,7 +2560,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2668,7 +2673,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2746,7 +2751,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2830,7 +2835,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2922,7 +2927,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3118,7 +3123,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,7 +3326,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3367,7 +3372,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3478,7 +3483,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3556,7 +3561,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3634,7 +3639,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3685,7 +3690,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3912,7 +3917,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3959,7 +3964,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4081,7 +4086,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4191,7 +4196,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4261,7 +4266,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4335,7 +4340,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4554,7 +4559,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py index fb8bc561ee3b..f10940bfd4a4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_08_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2264,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,7 +2451,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2646,7 +2651,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_08_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2692,7 +2697,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2800,7 +2805,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2877,7 +2882,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2946,7 +2951,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3135,7 +3140,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3257,7 +3262,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3454,7 +3459,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3659,7 +3664,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3710,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3813,7 +3818,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3890,7 +3895,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3974,7 +3979,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4066,7 +4071,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4259,7 +4264,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4459,7 +4464,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4505,7 +4510,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4613,7 +4618,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4768,7 +4773,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4819,7 +4824,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5046,7 +5051,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5093,7 +5098,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5215,7 +5220,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5325,7 +5330,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5394,7 +5399,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5468,7 +5473,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5684,7 +5689,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py index 44c052eeb87c..b29250f8f28d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -61,6 +62,10 @@ build_gallery_sharing_profile_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +93,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -283,7 +288,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -492,7 +497,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -540,7 +545,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +651,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -723,7 +728,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,7 +819,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1028,7 +1033,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1242,7 +1247,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1289,7 +1294,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1413,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1502,7 +1507,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1738,7 +1743,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1989,7 +1994,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2043,7 +2048,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2176,7 +2181,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2270,7 +2275,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2488,7 +2493,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2709,7 +2714,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2756,7 +2761,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2876,7 +2881,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2970,7 +2975,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3208,7 +3213,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3461,7 +3466,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3515,7 +3520,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3649,7 +3654,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3742,7 +3747,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py index 9872ca6a2a52..b37d294bbbf5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1016,7 +1021,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1213,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1414,7 +1419,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1467,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1568,7 +1573,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1645,7 +1650,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1736,7 +1741,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1950,7 +1955,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2164,7 +2169,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2211,7 +2216,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2329,7 +2334,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2423,7 +2428,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2664,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2910,7 +2915,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2964,7 +2969,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3097,7 +3102,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3191,7 +3196,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3414,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3630,7 +3635,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3677,7 +3682,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3796,7 +3801,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3890,7 +3895,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4128,7 +4133,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4381,7 +4386,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4435,7 +4440,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4569,7 +4574,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4662,7 +4667,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py index bf26083975c5..8132fb18645b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -205,6 +206,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -245,7 +250,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -400,7 +405,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -528,7 +533,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,7 +602,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,7 +653,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -711,7 +716,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -791,7 +796,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +881,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1041,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1171,7 +1176,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1240,7 +1245,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1301,7 +1306,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1361,7 +1366,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1443,7 +1448,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1606,7 +1611,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1738,7 +1743,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1807,7 +1812,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1875,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1934,7 +1939,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2013,7 +2018,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2109,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2307,7 +2312,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2501,7 +2506,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2623,7 +2628,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2690,7 +2695,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2757,7 +2762,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2894,7 +2899,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2977,7 +2982,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3118,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3246,7 +3251,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3315,7 +3320,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3368,7 +3373,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3427,7 +3432,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3514,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3568,7 +3573,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3641,7 +3646,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3717,7 +3722,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3926,7 +3931,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4127,7 +4132,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4248,7 +4253,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4309,7 +4314,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4394,7 +4399,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4536,7 +4541,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4589,7 +4594,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4647,7 +4652,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4734,7 +4739,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4825,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4886,7 +4891,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4944,7 +4949,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5006,7 +5011,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5089,7 +5094,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5191,7 +5196,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5261,7 +5266,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5456,7 +5461,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5650,7 +5655,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5833,7 +5838,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5955,7 +5960,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6013,7 +6018,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6059,7 +6064,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6155,7 +6160,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6272,7 +6277,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6336,7 +6341,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6426,7 +6431,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6512,7 +6517,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6579,7 +6584,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6681,7 +6686,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6774,7 +6779,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6867,7 +6872,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6960,7 +6965,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7057,7 +7062,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7253,7 +7258,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7300,7 +7305,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7406,7 +7411,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7448,7 +7453,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7561,7 +7566,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7756,7 +7761,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7980,7 +7985,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8050,7 +8055,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8241,7 +8246,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8425,7 +8430,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8545,7 +8550,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8596,7 +8601,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8784,7 +8789,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8983,7 +8988,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9044,7 +9049,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9125,7 +9130,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9210,7 +9215,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9296,7 +9301,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9369,7 +9374,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9573,7 +9578,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9753,7 +9758,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9933,7 +9938,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10116,7 +10121,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10305,7 +10310,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10482,7 +10487,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10666,7 +10671,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10873,7 +10878,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10998,7 +11003,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11056,7 +11061,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11265,7 +11270,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11352,7 +11357,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11533,7 +11538,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11714,7 +11719,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11820,7 +11825,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11880,7 +11885,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11958,7 +11963,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12122,7 +12127,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12257,7 +12262,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12315,7 +12320,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12432,7 +12437,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12494,7 +12499,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12575,7 +12580,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12666,7 +12671,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12860,7 +12865,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12981,7 +12986,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13126,7 +13131,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13264,7 +13269,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13336,7 +13341,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13401,7 +13406,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13476,7 +13481,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13565,7 +13570,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13657,7 +13662,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13866,7 +13871,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14066,7 +14071,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14195,7 +14200,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14262,7 +14267,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14355,7 +14360,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14565,7 +14570,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14771,7 +14776,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14892,7 +14897,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14959,7 +14964,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15047,7 +15052,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15142,7 +15147,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15239,7 +15244,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15347,7 +15352,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15420,7 +15425,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15639,7 +15644,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15849,7 +15854,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15976,7 +15981,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16046,7 +16051,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16122,7 +16127,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16312,7 +16317,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16412,7 +16417,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16518,7 +16523,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16727,7 +16732,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16860,7 +16865,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16921,7 +16926,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17004,7 +17009,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17080,7 +17085,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17193,7 +17198,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17292,7 +17297,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17391,7 +17396,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17516,7 +17521,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17564,7 +17569,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17676,7 +17681,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17724,7 +17729,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17943,7 +17948,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18118,7 +18123,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18326,7 +18331,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18401,7 +18406,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18452,7 +18457,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18660,7 +18665,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18860,7 +18865,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18981,7 +18986,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19050,7 +19055,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19145,7 +19150,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19362,7 +19367,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19570,7 +19575,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19697,7 +19702,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19775,7 +19780,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_compute_management_client_enums.py index 4e198654f248..601a69c9491c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_compute_management_client_enums.py @@ -101,8 +101,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -347,7 +347,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py index 89d9a55f9941..6680c30a0e2b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py @@ -1491,9 +1491,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1598,9 +1598,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2314,9 +2314,9 @@ class DiagnosticsProfile(_serialization.Model): 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :vartype boot_diagnostics: ~azure.mgmt.compute.v2021_11_01.models.BootDiagnostics @@ -2329,9 +2329,9 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :paramtype boot_diagnostics: ~azure.mgmt.compute.v2021_11_01.models.BootDiagnostics @@ -4300,9 +4300,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2021_11_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4390,9 +4390,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2021_11_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4483,7 +4483,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4578,7 +4578,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6514,7 +6514,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6534,7 +6534,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -11437,7 +11437,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11509,7 +11509,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11570,7 +11570,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -11650,7 +11650,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -14657,8 +14657,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2021_11_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -14688,8 +14688,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2021_11_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py index ff3c86e0f3ad..86fda9d5d008 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5931,7 +5936,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6091,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6214,7 +6219,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6283,7 +6288,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6334,7 +6339,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6396,7 +6401,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6475,7 +6480,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6559,7 +6564,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6719,7 +6724,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6854,7 +6859,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6923,7 +6928,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6984,7 +6989,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7044,7 +7049,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7126,7 +7131,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7289,7 +7294,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7421,7 +7426,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7490,7 +7495,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7553,7 +7558,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7614,7 +7619,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7692,7 +7697,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7783,7 +7788,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7983,7 +7988,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8174,7 +8179,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8296,7 +8301,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8362,7 +8367,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8429,7 +8434,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8566,7 +8571,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8649,7 +8654,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8785,7 +8790,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8918,7 +8923,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8987,7 +8992,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9038,7 +9043,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9097,7 +9102,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9179,7 +9184,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9238,7 +9243,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9311,7 +9316,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9387,7 +9392,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9596,7 +9601,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9797,7 +9802,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9918,7 +9923,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9979,7 +9984,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10064,7 +10069,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10144,7 +10149,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10206,7 +10211,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10259,7 +10264,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10317,7 +10322,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10404,7 +10409,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10490,7 +10495,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10556,7 +10561,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10614,7 +10619,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10676,7 +10681,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10759,7 +10764,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10860,7 +10865,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10930,7 +10935,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11125,7 +11130,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11316,7 +11321,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11496,7 +11501,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11618,7 +11623,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11676,7 +11681,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11722,7 +11727,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11816,7 +11821,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11933,7 +11938,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11996,7 +12001,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12085,7 +12090,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12170,7 +12175,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12237,7 +12242,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12339,7 +12344,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12432,7 +12437,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12525,7 +12530,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12618,7 +12623,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12715,7 +12720,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12911,7 +12916,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12958,7 +12963,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13062,7 +13067,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13104,7 +13109,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13217,7 +13222,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13412,7 +13417,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13633,7 +13638,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13703,7 +13708,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13894,7 +13899,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14078,7 +14083,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14198,7 +14203,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14249,7 +14254,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14437,7 +14442,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14636,7 +14641,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14697,7 +14702,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14778,7 +14783,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14863,7 +14868,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14949,7 +14954,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15022,7 +15027,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15226,7 +15231,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15406,7 +15411,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15586,7 +15591,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15769,7 +15774,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15958,7 +15963,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16135,7 +16140,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16319,7 +16324,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16526,7 +16531,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16651,7 +16656,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16709,7 +16714,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16917,7 +16922,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17004,7 +17009,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17185,7 +17190,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17366,7 +17371,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17472,7 +17477,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17532,7 +17537,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17610,7 +17615,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17774,7 +17779,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17909,7 +17914,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17967,7 +17972,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18084,7 +18089,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18146,7 +18151,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18227,7 +18232,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18318,7 +18323,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18512,7 +18517,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18633,7 +18638,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18778,7 +18783,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18916,7 +18921,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18988,7 +18993,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19053,7 +19058,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19128,7 +19133,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19217,7 +19222,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19309,7 +19314,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19518,7 +19523,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19718,7 +19723,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19847,7 +19852,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19914,7 +19919,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20007,7 +20012,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20217,7 +20222,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20423,7 +20428,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20544,7 +20549,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20611,7 +20616,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20699,7 +20704,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20792,7 +20797,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20889,7 +20894,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20997,7 +21002,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21070,7 +21075,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21289,7 +21294,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21499,7 +21504,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21626,7 +21631,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21696,7 +21701,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21772,7 +21777,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21962,7 +21967,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22062,7 +22067,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22168,7 +22173,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22377,7 +22382,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22510,7 +22515,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22571,7 +22576,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22654,7 +22659,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22730,7 +22735,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22843,7 +22848,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22942,7 +22947,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23041,7 +23046,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23166,7 +23171,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23214,7 +23219,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23326,7 +23331,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23374,7 +23379,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23590,7 +23595,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23764,7 +23769,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23971,7 +23976,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24046,7 +24051,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24097,7 +24102,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24305,7 +24310,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24505,7 +24510,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24626,7 +24631,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24695,7 +24700,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24790,7 +24795,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25007,7 +25012,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25215,7 +25220,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25342,7 +25347,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25420,7 +25425,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py index c6fd01195fce..1fc09fb6bc32 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1088,7 +1093,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1278,7 +1283,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1641,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1719,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1783,7 +1788,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1975,7 +1980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2099,7 +2104,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2299,7 +2304,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2509,7 +2514,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2555,7 +2560,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2668,7 +2673,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2746,7 +2751,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2830,7 +2835,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2922,7 +2927,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3118,7 +3123,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,7 +3326,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3367,7 +3372,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3478,7 +3483,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3556,7 +3561,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3634,7 +3639,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3685,7 +3690,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3912,7 +3917,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3959,7 +3964,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4081,7 +4086,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4191,7 +4196,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4261,7 +4266,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4335,7 +4340,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4554,7 +4559,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py index 707d5351777c..f6216f29e340 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2264,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,7 +2451,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2646,7 +2651,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2692,7 +2697,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2800,7 +2805,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2877,7 +2882,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2946,7 +2951,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3135,7 +3140,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3257,7 +3262,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3454,7 +3459,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3659,7 +3664,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3710,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3813,7 +3818,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3890,7 +3895,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3974,7 +3979,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4066,7 +4071,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4259,7 +4264,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4459,7 +4464,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4505,7 +4510,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4613,7 +4618,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4768,7 +4773,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4819,7 +4824,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5046,7 +5051,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5093,7 +5098,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5215,7 +5220,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5325,7 +5330,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5394,7 +5399,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5468,7 +5473,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5684,7 +5689,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py index 0f83f760f313..7f1db466faea 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_shared_gallery_images_list_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +299,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +508,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +556,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +662,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,7 +739,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +830,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1044,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1258,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1305,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1513,7 +1518,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1749,7 +1754,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2000,7 +2005,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2192,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2286,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,7 +2504,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2725,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2772,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3224,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3472,7 +3477,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3526,7 +3531,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3660,7 +3665,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3753,7 +3758,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3980,7 +3985,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4154,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4236,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4330,7 +4335,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4423,7 +4428,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,7 +4506,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4647,7 +4652,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4758,7 +4763,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4827,7 +4832,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py index 3a519ce0f449..7e32cef44813 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1395,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1592,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1793,7 +1798,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1846,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1947,7 +1952,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2029,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2115,7 +2120,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2329,7 +2334,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2590,7 +2595,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2807,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3043,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3289,7 +3294,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3348,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3476,7 +3481,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3570,7 +3575,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3793,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4009,7 +4014,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4175,7 +4180,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4269,7 +4274,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4512,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4760,7 +4765,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4814,7 +4819,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,7 +4953,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5041,7 +5046,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5269,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5340,7 +5345,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5432,7 +5437,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5519,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5613,7 +5618,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5706,7 +5711,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5784,7 +5789,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5864,7 +5869,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5928,7 +5933,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6039,7 +6044,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6108,7 +6113,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py index e4dde36f3c6b..050daed0255b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -206,6 +207,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -246,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +350,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +452,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +555,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +625,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +816,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +1000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,7 +1120,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1171,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1359,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1553,7 +1558,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1614,7 +1619,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1700,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1785,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1866,7 +1871,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1939,7 +1944,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2143,7 +2148,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2323,7 +2328,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2503,7 +2508,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2691,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2880,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3052,7 +3057,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3236,7 +3241,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3448,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3568,7 +3573,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3626,7 +3631,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3825,7 +3830,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4035,7 +4040,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4241,7 +4246,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4362,7 +4367,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4429,7 +4434,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4517,7 +4522,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4612,7 +4617,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4709,7 +4714,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4817,7 +4822,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4890,7 +4895,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5109,7 +5114,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5319,7 +5324,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5516,7 +5521,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5592,7 +5597,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5782,7 +5787,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5882,7 +5887,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5993,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6197,7 +6202,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6330,7 +6335,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6391,7 +6396,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6474,7 +6479,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6550,7 +6555,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6663,7 +6668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6762,7 +6767,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6866,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6986,7 +6991,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7034,7 +7039,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7146,7 +7151,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7194,7 +7199,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7418,7 +7423,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7627,7 +7632,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7828,7 +7833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7949,7 +7954,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8010,7 +8015,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8093,7 +8098,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8163,7 +8168,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8358,7 +8363,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8552,7 +8557,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8735,7 +8740,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8857,7 +8862,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8915,7 +8920,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8961,7 +8966,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9057,7 +9062,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9174,7 +9179,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9238,7 +9243,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9328,7 +9333,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9414,7 +9419,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9481,7 +9486,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9583,7 +9588,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9676,7 +9681,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9769,7 +9774,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9862,7 +9867,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9959,7 +9964,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10155,7 +10160,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10202,7 +10207,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10308,7 +10313,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10350,7 +10355,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10463,7 +10468,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10658,7 +10663,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10883,7 +10888,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10963,7 +10968,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11025,7 +11030,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11078,7 +11083,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11136,7 +11141,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11194,7 +11199,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11280,7 +11285,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11366,7 +11371,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11432,7 +11437,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11490,7 +11495,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11552,7 +11557,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11636,7 +11641,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11695,7 +11700,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11768,7 +11773,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11909,7 +11914,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12037,7 +12042,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12106,7 +12111,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12157,7 +12162,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12220,7 +12225,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12300,7 +12305,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12385,7 +12390,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12545,7 +12550,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12680,7 +12685,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12749,7 +12754,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12810,7 +12815,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12870,7 +12875,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12952,7 +12957,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13115,7 +13120,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13247,7 +13252,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13316,7 +13321,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13379,7 +13384,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13443,7 +13448,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13522,7 +13527,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13613,7 +13618,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13816,7 +13821,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14010,7 +14015,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14132,7 +14137,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14199,7 +14204,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14266,7 +14271,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14403,7 +14408,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14486,7 +14491,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14622,7 +14627,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14755,7 +14760,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14824,7 +14829,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14877,7 +14882,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14936,7 +14941,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15003,7 +15008,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15184,7 +15189,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15365,7 +15370,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15471,7 +15476,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15531,7 +15536,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15609,7 +15614,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15773,7 +15778,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15908,7 +15913,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15966,7 +15971,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16083,7 +16088,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16145,7 +16150,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16226,7 +16231,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16317,7 +16322,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16511,7 +16516,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16632,7 +16637,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16777,7 +16782,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16915,7 +16920,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16987,7 +16992,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17052,7 +17057,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17127,7 +17132,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17216,7 +17221,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17308,7 +17313,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17517,7 +17522,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17717,7 +17722,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17846,7 +17851,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17913,7 +17918,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18001,7 +18006,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18176,7 +18181,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18384,7 +18389,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18459,7 +18464,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18510,7 +18515,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18718,7 +18723,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18918,7 +18923,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19039,7 +19044,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19108,7 +19113,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19203,7 +19208,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19420,7 +19425,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19628,7 +19633,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19755,7 +19760,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19833,7 +19838,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_compute_management_client_enums.py index 5687a9f647b1..e560d005a142 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_compute_management_client_enums.py @@ -102,8 +102,8 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -361,7 +361,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py index 291780c6aa6f..aafb1a347878 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py @@ -1502,9 +1502,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1609,9 +1609,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2388,9 +2388,9 @@ class DiagnosticsProfile(_serialization.Model): 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :vartype boot_diagnostics: ~azure.mgmt.compute.v2022_03_01.models.BootDiagnostics @@ -2403,9 +2403,9 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :paramtype boot_diagnostics: ~azure.mgmt.compute.v2022_03_01.models.BootDiagnostics @@ -4437,9 +4437,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2022_03_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4527,9 +4527,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2022_03_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4620,7 +4620,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4715,7 +4715,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -6756,7 +6756,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6776,7 +6776,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -11682,7 +11682,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11765,7 +11765,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11836,7 +11836,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -11916,7 +11916,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -15043,8 +15043,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2022_03_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -15074,8 +15074,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2022_03_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py index b82cec2dfc22..247e56505d70 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5962,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6061,7 +6066,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6265,7 +6270,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6335,7 +6340,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6526,7 +6531,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6710,7 +6715,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6830,7 +6835,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6881,7 +6886,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7069,7 +7074,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7268,7 +7273,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7329,7 +7334,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7410,7 +7415,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7495,7 +7500,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7581,7 +7586,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7659,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7858,7 +7863,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8038,7 +8043,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8218,7 +8223,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8401,7 +8406,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8590,7 +8595,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8767,7 +8772,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8951,7 +8956,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9158,7 +9163,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9283,7 +9288,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9341,7 +9346,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9540,7 +9545,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9750,7 +9755,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9956,7 +9961,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10077,7 +10082,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10144,7 +10149,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10232,7 +10237,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10325,7 +10330,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10422,7 +10427,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10530,7 +10535,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10603,7 +10608,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10822,7 +10827,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11032,7 +11037,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11164,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11229,7 +11234,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11310,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11495,7 +11500,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11595,7 +11600,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11701,7 +11706,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11910,7 +11915,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12043,7 +12048,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12104,7 +12109,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12187,7 +12192,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12263,7 +12268,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12376,7 +12381,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12475,7 +12480,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12574,7 +12579,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12699,7 +12704,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12747,7 +12752,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12859,7 +12864,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12907,7 +12912,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13128,7 +13133,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13337,7 +13342,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13538,7 +13543,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13659,7 +13664,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13720,7 +13725,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13802,7 +13807,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13872,7 +13877,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14067,7 +14072,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14258,7 +14263,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14438,7 +14443,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14560,7 +14565,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14618,7 +14623,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14664,7 +14669,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14758,7 +14763,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14875,7 +14880,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14938,7 +14943,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15027,7 +15032,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15112,7 +15117,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15179,7 +15184,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15281,7 +15286,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15374,7 +15379,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15467,7 +15472,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15560,7 +15565,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15657,7 +15662,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15853,7 +15858,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15900,7 +15905,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16004,7 +16009,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16046,7 +16051,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16159,7 +16164,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16354,7 +16359,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16576,7 +16581,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16656,7 +16661,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16718,7 +16723,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16771,7 +16776,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16829,7 +16834,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16885,7 +16890,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16971,7 +16976,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17057,7 +17062,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17123,7 +17128,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17181,7 +17186,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17243,7 +17248,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17327,7 +17332,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17386,7 +17391,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17459,7 +17464,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17600,7 +17605,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17728,7 +17733,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17797,7 +17802,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17848,7 +17853,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17910,7 +17915,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17989,7 +17994,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18073,7 +18078,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18233,7 +18238,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18368,7 +18373,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18437,7 +18442,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18498,7 +18503,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18558,7 +18563,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18640,7 +18645,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18803,7 +18808,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18935,7 +18940,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19004,7 +19009,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19067,7 +19072,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19128,7 +19133,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19206,7 +19211,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19297,7 +19302,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19497,7 +19502,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19688,7 +19693,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19810,7 +19815,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19876,7 +19881,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19943,7 +19948,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20080,7 +20085,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20163,7 +20168,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20299,7 +20304,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20432,7 +20437,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20501,7 +20506,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20552,7 +20557,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20611,7 +20616,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20678,7 +20683,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20859,7 +20864,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21040,7 +21045,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21146,7 +21151,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21206,7 +21211,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21284,7 +21289,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21448,7 +21453,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21583,7 +21588,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21641,7 +21646,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21758,7 +21763,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21820,7 +21825,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21901,7 +21906,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21992,7 +21997,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22186,7 +22191,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22307,7 +22312,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22452,7 +22457,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22590,7 +22595,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22662,7 +22667,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22727,7 +22732,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22802,7 +22807,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22891,7 +22896,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22983,7 +22988,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23192,7 +23197,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23392,7 +23397,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23521,7 +23526,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23588,7 +23593,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23676,7 +23681,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23850,7 +23855,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24057,7 +24062,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24132,7 +24137,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24183,7 +24188,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24391,7 +24396,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24591,7 +24596,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24712,7 +24717,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24781,7 +24786,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24876,7 +24881,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25093,7 +25098,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25301,7 +25306,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25428,7 +25433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25506,7 +25511,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py index 7b164ccce521..53fd9ba96538 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1293,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1496,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1542,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2134,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2251,7 +2256,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2753,7 +2758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2995,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3079,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3259,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3552,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3875,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4124,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4375,7 +4380,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py index 902a27512dd3..1ccb5a2fab5f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2022_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2268,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2461,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2656,7 +2661,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3016,7 +3021,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3248,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3295,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3412,7 +3417,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3706,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,7 +3911,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3952,7 +3957,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4060,7 +4065,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4137,7 +4142,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4226,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4823,7 +4828,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5015,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5215,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5261,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5369,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5446,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5515,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5704,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py index f2238d69a144..523950a5d1a7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_shared_gallery_images_list_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +299,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +508,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +556,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +662,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,7 +739,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +830,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1044,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1258,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1305,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1513,7 +1518,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1749,7 +1754,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2000,7 +2005,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2192,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2286,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,7 +2504,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2725,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2772,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3224,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3472,7 +3477,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3526,7 +3531,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3660,7 +3665,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3753,7 +3758,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3980,7 +3985,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4154,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4236,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4330,7 +4335,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4423,7 +4428,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,7 +4506,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4647,7 +4652,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4758,7 +4763,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4827,7 +4832,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py index 91283b8033f8..3f3e2bb593f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1395,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1592,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1793,7 +1798,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1846,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1947,7 +1952,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2029,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2115,7 +2120,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2329,7 +2334,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2590,7 +2595,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2807,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3043,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3289,7 +3294,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3348,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3476,7 +3481,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3570,7 +3575,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3793,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4009,7 +4014,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4175,7 +4180,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4269,7 +4274,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4512,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4760,7 +4765,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4814,7 +4819,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,7 +4953,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5041,7 +5046,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5269,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5340,7 +5345,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5432,7 +5437,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5519,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5613,7 +5618,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5706,7 +5711,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5784,7 +5789,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5864,7 +5869,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5928,7 +5933,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6039,7 +6044,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6108,7 +6113,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py index 0ed428e719a3..d9c2ddc6293b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -64,6 +65,10 @@ build_cloud_services_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +217,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +278,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +353,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,7 +521,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,7 +621,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +735,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +816,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -877,7 +882,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -969,7 +974,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1163,7 +1168,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1351,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1450,7 +1455,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,7 +1512,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1567,7 +1572,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1719,7 @@ async def get_next(next_link=None): async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1809,7 +1814,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1909,7 +1914,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2085,7 +2090,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2269,7 @@ async def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,7 +2451,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2644,7 +2649,7 @@ async def _walk_update_domain_initial( # pylint: disable=inconsistent-return-st parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2850,7 +2855,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_04_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2915,7 +2920,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3013,7 +3018,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3075,7 +3080,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3151,7 +3156,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3213,7 +3218,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_compute_management_client_enums.py index a918ba259195..97e273bae540 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_compute_management_client_enums.py @@ -12,8 +12,8 @@ class CloudServiceSlotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ - **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. """ @@ -25,8 +25,8 @@ class CloudServiceUpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py index 977cec82a4bc..0f95ecdd6c86 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py @@ -419,8 +419,8 @@ class CloudServiceNetworkProfile(_serialization.Model): :vartype load_balancer_configurations: list[~azure.mgmt.compute.v2022_04_04.models.LoadBalancerConfiguration] :ivar slot_type: Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. Known values are: "Production" and "Staging". :vartype slot_type: str or ~azure.mgmt.compute.v2022_04_04.models.CloudServiceSlotType @@ -452,8 +452,8 @@ def __init__( :paramtype load_balancer_configurations: list[~azure.mgmt.compute.v2022_04_04.models.LoadBalancerConfiguration] :keyword slot_type: Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. Known values are: "Production" and "Staging". :paramtype slot_type: str or ~azure.mgmt.compute.v2022_04_04.models.CloudServiceSlotType @@ -523,8 +523,8 @@ class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many- :ivar upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". @@ -605,8 +605,8 @@ def __init__( :keyword upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py index 327952c1fee2..17735c23ef28 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1026,7 +1031,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1152,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1213,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,7 +1287,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1355,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1450,7 +1455,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1550,7 +1555,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1664,7 +1669,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,7 +1750,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1815,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1902,7 +1907,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2096,7 +2101,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2279,7 +2284,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2381,7 +2386,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2438,7 +2443,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2497,7 +2502,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2582,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2643,7 +2648,7 @@ def get_next(next_link=None): def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2736,7 +2741,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2834,7 +2839,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3010,7 +3015,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3189,7 +3194,7 @@ def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3371,7 +3376,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3569,7 +3574,7 @@ def _walk_update_domain_initial( # pylint: disable=inconsistent-return-statemen parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3775,7 +3780,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_04_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3839,7 +3844,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3942,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3998,7 +4003,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4074,7 +4079,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4135,7 +4140,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py index 3429ace300a3..dd66591cc52b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_07_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1293,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1496,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1542,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2134,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2251,7 +2256,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2753,7 +2758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2995,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3079,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3259,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3552,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3875,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_07_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4124,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4375,7 +4380,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py index de7ca5858bb2..9fcad329615e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2022_07_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2268,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2461,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2656,7 +2661,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3016,7 +3021,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3248,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3295,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3412,7 +3417,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3706,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,7 +3911,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3952,7 +3957,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4060,7 +4065,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4137,7 +4142,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4226,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4823,7 +4828,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5015,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5215,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_07_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5261,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5369,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5446,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5515,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5704,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py index 783eec620088..3fa46c22a5db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -206,6 +207,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -246,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +350,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +452,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +555,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +625,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +816,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +1000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,7 +1120,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1171,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1359,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1553,7 +1558,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1614,7 +1619,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1700,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1785,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1866,7 +1871,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1939,7 +1944,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2143,7 +2148,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2323,7 +2328,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2503,7 +2508,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2691,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2880,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3052,7 +3057,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3236,7 +3241,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3448,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_08_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3568,7 +3573,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3626,7 +3631,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3825,7 +3830,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4035,7 +4040,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4241,7 +4246,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4362,7 +4367,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4429,7 +4434,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4517,7 +4522,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4612,7 +4617,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4709,7 +4714,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4817,7 +4822,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4890,7 +4895,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5109,7 +5114,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5319,7 +5324,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5516,7 +5521,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5592,7 +5597,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5782,7 +5787,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5882,7 +5887,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5993,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6197,7 +6202,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6330,7 +6335,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6391,7 +6396,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6474,7 +6479,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6550,7 +6555,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6663,7 +6668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6762,7 +6767,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6866,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6986,7 +6991,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7034,7 +7039,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7146,7 +7151,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7194,7 +7199,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7418,7 +7423,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7627,7 +7632,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7828,7 +7833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7949,7 +7954,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8010,7 +8015,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8093,7 +8098,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8163,7 +8168,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8358,7 +8363,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8552,7 +8557,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8735,7 +8740,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8857,7 +8862,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8915,7 +8920,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8961,7 +8966,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9057,7 +9062,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9174,7 +9179,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9238,7 +9243,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9328,7 +9333,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9414,7 +9419,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9481,7 +9486,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9583,7 +9588,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9676,7 +9681,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9769,7 +9774,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9862,7 +9867,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9959,7 +9964,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10155,7 +10160,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10202,7 +10207,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10308,7 +10313,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10350,7 +10355,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10463,7 +10468,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10658,7 +10663,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10883,7 +10888,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10963,7 +10968,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11025,7 +11030,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11078,7 +11083,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11136,7 +11141,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11194,7 +11199,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11280,7 +11285,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11366,7 +11371,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11432,7 +11437,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11490,7 +11495,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11552,7 +11557,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11636,7 +11641,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11695,7 +11700,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11768,7 +11773,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11909,7 +11914,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12037,7 +12042,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12106,7 +12111,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12157,7 +12162,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12220,7 +12225,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12300,7 +12305,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12385,7 +12390,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12545,7 +12550,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12680,7 +12685,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12749,7 +12754,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12810,7 +12815,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12870,7 +12875,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12952,7 +12957,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13115,7 +13120,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13247,7 +13252,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13316,7 +13321,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13379,7 +13384,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13443,7 +13448,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13522,7 +13527,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13613,7 +13618,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13816,7 +13821,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14010,7 +14015,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14132,7 +14137,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14199,7 +14204,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14266,7 +14271,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14403,7 +14408,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14486,7 +14491,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14622,7 +14627,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14755,7 +14760,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14824,7 +14829,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14877,7 +14882,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14936,7 +14941,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15003,7 +15008,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15184,7 +15189,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15365,7 +15370,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15471,7 +15476,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15531,7 +15536,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15609,7 +15614,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15773,7 +15778,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15908,7 +15913,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15966,7 +15971,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16083,7 +16088,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16145,7 +16150,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16226,7 +16231,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16317,7 +16322,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16511,7 +16516,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16632,7 +16637,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16777,7 +16782,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16915,7 +16920,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16987,7 +16992,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17052,7 +17057,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17127,7 +17132,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17216,7 +17221,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17308,7 +17313,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17517,7 +17522,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17717,7 +17722,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17846,7 +17851,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17913,7 +17918,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18001,7 +18006,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18176,7 +18181,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18384,7 +18389,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18459,7 +18464,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_08_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18510,7 +18515,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18718,7 +18723,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18918,7 +18923,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19039,7 +19044,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19108,7 +19113,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19203,7 +19208,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19420,7 +19425,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19628,7 +19633,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19755,7 +19760,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19833,7 +19838,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_compute_management_client_enums.py index 7ea169d1209c..3fa45b469a27 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_compute_management_client_enums.py @@ -113,9 +113,9 @@ class DiskControllerTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies how the virtual machine should be created. Possible values are: **Attach** \u2013 + """Specifies how the virtual machine should be created. Possible values are: **Attach** \\u2013 This value is used when you are using a specialized disk to create the virtual machine. - **FromImage** \u2013 This value is used when you are using an image to create the virtual + **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py index 054dcefffa2c..70248a81a316 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py @@ -1517,8 +1517,8 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be created. Possible values are: - **Attach** \u2013 This value is used when you are using a specialized disk to create the - virtual machine. **FromImage** \u2013 This value is used when you are using an image to create + **Attach** \\u2013 This value is used when you are using a specialized disk to create the + virtual machine. **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and "Attach". @@ -1619,8 +1619,8 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be created. Possible values - are: **Attach** \u2013 This value is used when you are using a specialized disk to create the - virtual machine. **FromImage** \u2013 This value is used when you are using an image to create + are: **Attach** \\u2013 This value is used when you are using a specialized disk to create the + virtual machine. **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and "Attach". @@ -2393,7 +2393,7 @@ class DiagnosticsProfile(_serialization.Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2407,7 +2407,7 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -4437,8 +4437,8 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2022_08_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be created. Possible values are: - **Attach** \u2013 This value is used when you are using a specialized disk to create the - virtual machine. **FromImage** \u2013 This value is used when you are using an image to create + **Attach** \\u2013 This value is used when you are using a specialized disk to create the + virtual machine. **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and "Attach". @@ -4521,8 +4521,8 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2022_08_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be created. Possible values - are: **Attach** \u2013 This value is used when you are using a specialized disk to create the - virtual machine. **FromImage** \u2013 This value is used when you are using an image to create + are: **Attach** \\u2013 This value is used when you are using a specialized disk to create the + virtual machine. **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and "Attach". @@ -4606,7 +4606,7 @@ class OSProfile(_serialization.Model): (Windows):** 8 characters **Minimum-length (Linux):** 6 characters **Max-length (Windows):** 123 characters **Max-length (Linux):** 72 characters **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled Has lower characters Has upper characters Has a digit - Has a special character (Regex match [\W_]) **Disallowed values:** "abc@123", "P@$$w0rd", + Has a special character (Regex match [\\W_]) **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" For resetting the password, see `How to reset the Remote Desktop service or its login password in a Windows VM @@ -4692,7 +4692,7 @@ def __init__( (Windows):** 8 characters **Minimum-length (Linux):** 6 characters **Max-length (Windows):** 123 characters **Max-length (Linux):** 72 characters **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled Has lower characters Has upper characters Has a digit - Has a special character (Regex match [\W_]) **Disallowed values:** "abc@123", "P@$$w0rd", + Has a special character (Regex match [\\W_]) **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" For resetting the password, see `How to reset the Remote Desktop service or its login password in a Windows VM @@ -6771,7 +6771,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -6791,7 +6791,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -11775,7 +11775,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11859,7 +11859,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -11931,7 +11931,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12011,7 +12011,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py index 07c5d3281107..3e320697706b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5962,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6061,7 +6066,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6265,7 +6270,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6335,7 +6340,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6526,7 +6531,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6710,7 +6715,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6830,7 +6835,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6881,7 +6886,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7069,7 +7074,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7268,7 +7273,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7329,7 +7334,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7410,7 +7415,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7495,7 +7500,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7581,7 +7586,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7659,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7858,7 +7863,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8038,7 +8043,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8218,7 +8223,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8401,7 +8406,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8590,7 +8595,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8767,7 +8772,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8951,7 +8956,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9158,7 +9163,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_08_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9283,7 +9288,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9341,7 +9346,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9540,7 +9545,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9750,7 +9755,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9956,7 +9961,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10077,7 +10082,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10144,7 +10149,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10232,7 +10237,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10325,7 +10330,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10422,7 +10427,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10530,7 +10535,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10603,7 +10608,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10822,7 +10827,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11032,7 +11037,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11164,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11229,7 +11234,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11310,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11495,7 +11500,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11595,7 +11600,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11701,7 +11706,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11910,7 +11915,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12043,7 +12048,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12104,7 +12109,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12187,7 +12192,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12263,7 +12268,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12376,7 +12381,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12475,7 +12480,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12574,7 +12579,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12699,7 +12704,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12747,7 +12752,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12859,7 +12864,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12907,7 +12912,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13128,7 +13133,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13337,7 +13342,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13538,7 +13543,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13659,7 +13664,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13720,7 +13725,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13802,7 +13807,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13872,7 +13877,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14067,7 +14072,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14258,7 +14263,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14438,7 +14443,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14560,7 +14565,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14618,7 +14623,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14664,7 +14669,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14758,7 +14763,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14875,7 +14880,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14938,7 +14943,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15027,7 +15032,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15112,7 +15117,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15179,7 +15184,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15281,7 +15286,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15374,7 +15379,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15467,7 +15472,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15560,7 +15565,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15657,7 +15662,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15853,7 +15858,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15900,7 +15905,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16004,7 +16009,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16046,7 +16051,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16159,7 +16164,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16354,7 +16359,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16576,7 +16581,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16656,7 +16661,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16718,7 +16723,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16771,7 +16776,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16829,7 +16834,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16885,7 +16890,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_08_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16971,7 +16976,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17057,7 +17062,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17123,7 +17128,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17181,7 +17186,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17243,7 +17248,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17327,7 +17332,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17386,7 +17391,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17459,7 +17464,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17600,7 +17605,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17728,7 +17733,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17797,7 +17802,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17848,7 +17853,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17910,7 +17915,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17989,7 +17994,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18073,7 +18078,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18233,7 +18238,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18368,7 +18373,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18437,7 +18442,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18498,7 +18503,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18558,7 +18563,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18640,7 +18645,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18803,7 +18808,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18935,7 +18940,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19004,7 +19009,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19067,7 +19072,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19128,7 +19133,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19206,7 +19211,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19297,7 +19302,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19497,7 +19502,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19688,7 +19693,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19810,7 +19815,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19876,7 +19881,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19943,7 +19948,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20080,7 +20085,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20163,7 +20168,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20299,7 +20304,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20432,7 +20437,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20501,7 +20506,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20552,7 +20557,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20611,7 +20616,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20678,7 +20683,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20859,7 +20864,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21040,7 +21045,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21146,7 +21151,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21206,7 +21211,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21284,7 +21289,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21448,7 +21453,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21583,7 +21588,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21641,7 +21646,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21758,7 +21763,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21820,7 +21825,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21901,7 +21906,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21992,7 +21997,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22186,7 +22191,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22307,7 +22312,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22452,7 +22457,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22590,7 +22595,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22662,7 +22667,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22727,7 +22732,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22802,7 +22807,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22891,7 +22896,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22983,7 +22988,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23192,7 +23197,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23392,7 +23397,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23521,7 +23526,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23588,7 +23593,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23676,7 +23681,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23850,7 +23855,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24057,7 +24062,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24132,7 +24137,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_08_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24183,7 +24188,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24391,7 +24396,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24591,7 +24596,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24712,7 +24717,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24781,7 +24786,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24876,7 +24881,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25093,7 +25098,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25301,7 +25306,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25428,7 +25433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25506,7 +25511,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py index 2bb5e66bc170..5b9d3738f106 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_shared_gallery_images_list_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +299,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +508,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +556,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +662,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,7 +739,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +830,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1044,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1258,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1305,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1513,7 +1518,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1749,7 +1754,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2000,7 +2005,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2192,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2286,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,7 +2504,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2725,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2772,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3224,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3472,7 +3477,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3526,7 +3531,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3660,7 +3665,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3753,7 +3758,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3980,7 +3985,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4154,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4236,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4330,7 +4335,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4423,7 +4428,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,7 +4506,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4647,7 +4652,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4758,7 +4763,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4827,7 +4832,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py index 794aa40a6bd4..a466132e964f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1395,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1592,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1793,7 +1798,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1846,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1947,7 +1952,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2029,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2115,7 +2120,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2329,7 +2334,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2590,7 +2595,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2807,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3043,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3289,7 +3294,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3348,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3476,7 +3481,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3570,7 +3575,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3793,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4009,7 +4014,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4175,7 +4180,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4269,7 +4274,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4512,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4760,7 +4765,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4814,7 +4819,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,7 +4953,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5041,7 +5046,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5269,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5340,7 +5345,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5432,7 +5437,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5519,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5613,7 +5618,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5706,7 +5711,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5784,7 +5789,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5864,7 +5869,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5928,7 +5933,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6039,7 +6044,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6108,7 +6113,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py index 92d12b6e451b..37fd69181e86 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -64,6 +65,10 @@ build_cloud_services_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +217,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +278,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +353,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,7 +521,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,7 +621,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +735,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +816,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -877,7 +882,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -969,7 +974,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1163,7 +1168,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1351,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1450,7 +1455,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,7 +1512,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1567,7 +1572,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1719,7 @@ async def get_next(next_link=None): async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1809,7 +1814,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1909,7 +1914,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2085,7 +2090,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2269,7 @@ async def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,7 +2451,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2644,7 +2649,7 @@ async def _walk_update_domain_initial( # pylint: disable=inconsistent-return-st parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2850,7 +2855,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_09_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2915,7 +2920,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3013,7 +3018,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3075,7 +3080,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3151,7 +3156,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3213,7 +3218,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_compute_management_client_enums.py index a918ba259195..97e273bae540 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_compute_management_client_enums.py @@ -12,8 +12,8 @@ class CloudServiceSlotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ - **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. """ @@ -25,8 +25,8 @@ class CloudServiceUpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py index 29d0bc6c7ead..740ccf577755 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py @@ -428,8 +428,8 @@ class CloudServiceNetworkProfile(_serialization.Model): :vartype load_balancer_configurations: list[~azure.mgmt.compute.v2022_09_04.models.LoadBalancerConfiguration] :ivar slot_type: Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. Known values are: "Production" and "Staging". :vartype slot_type: str or ~azure.mgmt.compute.v2022_09_04.models.CloudServiceSlotType @@ -461,8 +461,8 @@ def __init__( :paramtype load_balancer_configurations: list[~azure.mgmt.compute.v2022_09_04.models.LoadBalancerConfiguration] :keyword slot_type: Slot type for the cloud service. - Possible values are :code:`
    `:code:`
    `\ **Production**\ :code:`
    `:code:`
    `\ **Staging**\ :code:`
    `:code:`
    ` + Possible values are :code:`
    `:code:`
    `\\ **Production**\\ :code:`
    `:code:`
    `\\ **Staging**\\ :code:`
    `:code:`
    ` If not specified, the default value is Production. Known values are: "Production" and "Staging". :paramtype slot_type: str or ~azure.mgmt.compute.v2022_09_04.models.CloudServiceSlotType @@ -532,8 +532,8 @@ class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many- :ivar upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". @@ -614,8 +614,8 @@ def __init__( :keyword upgrade_mode: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - Possible Values are :code:`
    `:code:`
    `\ **Auto**\ :code:`
    `:code:`
    `\ - **Manual** :code:`
    `:code:`
    `\ **Simultaneous**\ :code:`
    `:code:`
    ` + Possible Values are :code:`
    `:code:`
    `\\ **Auto**\\ :code:`
    `:code:`
    `\\ + **Manual** :code:`
    `:code:`
    `\\ **Simultaneous**\\ :code:`
    `:code:`
    ` If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. Known values are: "Auto", "Manual", and "Simultaneous". diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py index 39ca5690c602..68158ce1f296 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1026,7 +1031,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1152,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1213,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,7 +1287,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1355,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1450,7 +1455,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1550,7 +1555,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( # pylint: disable=inconsistent-return-statements self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1664,7 +1669,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,7 +1750,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1815,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1902,7 +1907,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2096,7 +2101,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> _models.CloudService: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2279,7 +2284,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2381,7 +2386,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2438,7 +2443,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2497,7 +2502,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2582,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2643,7 +2648,7 @@ def get_next(next_link=None): def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2736,7 +2741,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2834,7 +2839,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3010,7 +3015,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3189,7 +3194,7 @@ def _rebuild_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3371,7 +3376,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3569,7 +3574,7 @@ def _walk_update_domain_initial( # pylint: disable=inconsistent-return-statemen parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3775,7 +3780,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_09_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3839,7 +3844,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3942,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3998,7 +4003,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4074,7 +4079,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4135,7 +4140,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py index 00245b882a6d..f23dc1574b6d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -206,6 +207,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -246,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +350,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +452,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +555,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +625,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +816,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +1000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,7 +1120,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1171,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1359,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1553,7 +1558,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1614,7 +1619,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1700,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1785,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1866,7 +1871,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1939,7 +1944,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2143,7 +2148,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2323,7 +2328,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2503,7 +2508,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2691,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2880,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3052,7 +3057,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3236,7 +3241,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3448,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3568,7 +3573,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3626,7 +3631,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3825,7 +3830,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4035,7 +4040,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4241,7 +4246,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4362,7 +4367,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4429,7 +4434,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4517,7 +4522,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4612,7 +4617,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4709,7 +4714,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4817,7 +4822,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4890,7 +4895,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5109,7 +5114,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5319,7 +5324,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5516,7 +5521,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5592,7 +5597,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5782,7 +5787,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5882,7 +5887,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5993,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6197,7 +6202,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6330,7 +6335,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6391,7 +6396,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6474,7 +6479,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6550,7 +6555,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6663,7 +6668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6762,7 +6767,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6866,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6986,7 +6991,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7034,7 +7039,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7146,7 +7151,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7194,7 +7199,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7418,7 +7423,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7627,7 +7632,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7828,7 +7833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7949,7 +7954,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8010,7 +8015,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8093,7 +8098,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8163,7 +8168,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8358,7 +8363,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8552,7 +8557,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8735,7 +8740,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8857,7 +8862,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8915,7 +8920,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8961,7 +8966,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9057,7 +9062,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9174,7 +9179,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9238,7 +9243,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9328,7 +9333,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9414,7 +9419,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9481,7 +9486,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9583,7 +9588,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9676,7 +9681,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9769,7 +9774,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9862,7 +9867,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9959,7 +9964,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10170,7 +10175,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10217,7 +10222,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10323,7 +10328,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10365,7 +10370,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10478,7 +10483,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10673,7 +10678,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10898,7 +10903,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10978,7 +10983,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11040,7 +11045,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11093,7 +11098,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11151,7 +11156,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11209,7 +11214,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11295,7 +11300,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11381,7 +11386,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11447,7 +11452,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11505,7 +11510,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11567,7 +11572,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11651,7 +11656,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11710,7 +11715,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11783,7 +11788,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11924,7 +11929,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12052,7 +12057,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12121,7 +12126,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12172,7 +12177,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12235,7 +12240,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12315,7 +12320,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12400,7 +12405,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12560,7 +12565,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12695,7 +12700,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12764,7 +12769,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12825,7 +12830,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12885,7 +12890,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12967,7 +12972,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13130,7 +13135,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13262,7 +13267,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13331,7 +13336,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13394,7 +13399,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13458,7 +13463,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13537,7 +13542,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13628,7 +13633,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13831,7 +13836,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14025,7 +14030,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14147,7 +14152,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14214,7 +14219,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14281,7 +14286,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14418,7 +14423,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14506,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14637,7 +14642,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14770,7 +14775,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14839,7 +14844,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14892,7 +14897,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14951,7 +14956,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15018,7 +15023,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15199,7 +15204,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15380,7 +15385,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15486,7 +15491,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15546,7 +15551,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15624,7 +15629,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15788,7 +15793,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15923,7 +15928,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15981,7 +15986,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16098,7 +16103,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16160,7 +16165,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16241,7 +16246,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16332,7 +16337,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16526,7 +16531,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16647,7 +16652,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16792,7 +16797,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16930,7 +16935,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17002,7 +17007,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17067,7 +17072,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17142,7 +17147,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17231,7 +17236,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17323,7 +17328,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17532,7 +17537,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17732,7 +17737,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17861,7 +17866,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17928,7 +17933,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18016,7 +18021,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18191,7 +18196,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18399,7 +18404,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18474,7 +18479,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18525,7 +18530,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18733,7 +18738,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18933,7 +18938,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19054,7 +19059,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19123,7 +19128,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19218,7 +19223,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19435,7 +19440,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19643,7 +19648,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19770,7 +19775,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19848,7 +19853,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_compute_management_client_enums.py index f4aec20759fc..13e36c102eb3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_compute_management_client_enums.py @@ -125,8 +125,8 @@ class DiskControllerTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies how the virtual machine should be created.:code:`
    `:code:`
    ` Possible values - are::code:`
    `:code:`
    ` **Attach** \u2013 This value is used when you are using a - specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \u2013 + are::code:`
    `:code:`
    ` **Attach** \\u2013 This value is used when you are using a + specialized disk to create the virtual machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. @@ -399,7 +399,7 @@ class PatchOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible values are: - :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. + :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. """ HTTP = "Http" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py index d7432d3468e3..c4d303e3cfb4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py @@ -1562,9 +1562,9 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -1670,9 +1670,9 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -2450,9 +2450,9 @@ class DiagnosticsProfile(_serialization.Model): 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :vartype boot_diagnostics: ~azure.mgmt.compute.v2022_11_01.models.BootDiagnostics @@ -2465,9 +2465,9 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. :code:`
    `\ **NOTE**\ : If storageUri is - being specified then ensure that the storage account is in the same region and subscription as - the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. + Console Output and Screenshot to diagnose VM status. :code:`
    `\\ **NOTE**\\ : If storageUri + is being specified then ensure that the storage account is in the same region and subscription + as the VM. :code:`
    `:code:`
    ` You can easily view the output of your console log. :code:`
    `:code:`
    ` Azure also enables you to see a screenshot of the VM from the hypervisor. :paramtype boot_diagnostics: ~azure.mgmt.compute.v2022_11_01.models.BootDiagnostics @@ -4553,9 +4553,9 @@ class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attribu used by the virtual machine. :vartype diff_disk_settings: ~azure.mgmt.compute.v2022_11_01.models.DiffDiskSettings :ivar create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4644,9 +4644,9 @@ def __init__( disk used by the virtual machine. :paramtype diff_disk_settings: ~azure.mgmt.compute.v2022_11_01.models.DiffDiskSettings :keyword create_option: Specifies how the virtual machine should be - created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** \u2013 - This value is used when you are using a specialized disk to create the virtual - machine.:code:`
    `:code:`
    ` **FromImage** \u2013 This value is used when you are using an + created.:code:`
    `:code:`
    ` Possible values are::code:`
    `:code:`
    ` **Attach** + \\u2013 This value is used when you are using a specialized disk to create the virtual + machine.:code:`
    `:code:`
    ` **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: "FromImage", "Empty", and @@ -4772,7 +4772,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4867,7 +4867,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4931,7 +4931,7 @@ class OSProfileProvisioningData(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4968,7 +4968,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7089,7 +7089,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7109,7 +7109,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -12128,7 +12128,7 @@ class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too disabled on the disk. :vartype write_accelerator_enabled: bool :ivar create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -12212,7 +12212,7 @@ def __init__( disabled on the disk. :paramtype write_accelerator_enabled: bool :keyword create_option: Specifies how the virtual machines in the scale set should be - created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \u2013 This value is + created.:code:`
    `:code:`
    ` The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: @@ -12284,7 +12284,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12369,7 +12369,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -15626,8 +15626,8 @@ class WinRMListener(_serialization.Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :vartype protocol: str or ~azure.mgmt.compute.v2022_11_01.models.ProtocolTypes :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault @@ -15657,8 +15657,8 @@ def __init__( ) -> None: """ :keyword protocol: Specifies the protocol of WinRM listener. :code:`
    `:code:`
    ` Possible - values are: :code:`
    `\ **http** :code:`
    `:code:`
    ` **https**. Known values are: "Http" - and "Https". + values are: :code:`
    `\\ **http** :code:`
    `:code:`
    ` **https**. Known values are: + "Http" and "Https". :paramtype protocol: str or ~azure.mgmt.compute.v2022_11_01.models.ProtocolTypes :keyword certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py index 0d1ae59185ec..0858aec12ef1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -5962,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6061,7 +6066,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6167,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6265,7 +6270,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6335,7 +6340,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6526,7 +6531,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6710,7 +6715,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6830,7 +6835,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6881,7 +6886,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7069,7 +7074,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7268,7 +7273,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7329,7 +7334,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7410,7 +7415,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7495,7 +7500,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7581,7 +7586,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7659,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7858,7 +7863,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8038,7 +8043,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8218,7 +8223,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8401,7 +8406,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8590,7 +8595,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8767,7 +8772,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8951,7 +8956,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9158,7 +9163,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9283,7 +9288,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9341,7 +9346,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9540,7 +9545,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9750,7 +9755,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9956,7 +9961,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10077,7 +10082,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10144,7 +10149,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10232,7 +10237,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10325,7 +10330,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10422,7 +10427,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10530,7 +10535,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10603,7 +10608,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10822,7 +10827,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11032,7 +11037,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11164,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11229,7 +11234,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11310,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11495,7 +11500,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11595,7 +11600,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11701,7 +11706,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11910,7 +11915,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12043,7 +12048,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12104,7 +12109,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12187,7 +12192,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12263,7 +12268,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12376,7 +12381,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12475,7 +12480,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12574,7 +12579,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12699,7 +12704,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12747,7 +12752,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12859,7 +12864,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12907,7 +12912,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13128,7 +13133,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13337,7 +13342,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13538,7 +13543,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13659,7 +13664,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13720,7 +13725,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13802,7 +13807,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13872,7 +13877,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14067,7 +14072,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14258,7 +14263,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14438,7 +14443,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14560,7 +14565,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14618,7 +14623,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14664,7 +14669,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14758,7 +14763,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14875,7 +14880,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14938,7 +14943,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15027,7 +15032,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15112,7 +15117,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15179,7 +15184,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15281,7 +15286,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15374,7 +15379,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15467,7 +15472,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15560,7 +15565,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15657,7 +15662,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15868,7 +15873,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15915,7 +15920,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16019,7 +16024,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16061,7 +16066,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16174,7 +16179,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16369,7 +16374,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16591,7 +16596,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16671,7 +16676,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16733,7 +16738,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16786,7 +16791,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16844,7 +16849,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16900,7 +16905,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_11_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16986,7 +16991,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17072,7 +17077,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17138,7 +17143,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17196,7 +17201,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17258,7 +17263,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17342,7 +17347,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17401,7 +17406,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17474,7 +17479,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17615,7 +17620,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17743,7 +17748,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17812,7 +17817,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17863,7 +17868,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17925,7 +17930,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18004,7 +18009,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18088,7 +18093,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18248,7 +18253,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18383,7 +18388,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18452,7 +18457,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18513,7 +18518,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18573,7 +18578,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18655,7 +18660,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18818,7 +18823,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18950,7 +18955,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19019,7 +19024,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19082,7 +19087,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19143,7 +19148,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19221,7 +19226,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19312,7 +19317,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19512,7 +19517,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19703,7 +19708,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19825,7 +19830,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19891,7 +19896,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19958,7 +19963,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20095,7 +20100,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20178,7 +20183,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20314,7 +20319,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20447,7 +20452,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20516,7 +20521,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20567,7 +20572,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20626,7 +20631,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20693,7 +20698,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20874,7 +20879,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21055,7 +21060,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21161,7 +21166,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21221,7 +21226,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21299,7 +21304,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21463,7 +21468,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21598,7 +21603,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21656,7 +21661,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21773,7 +21778,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21835,7 +21840,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21916,7 +21921,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22007,7 +22012,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22201,7 +22206,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22322,7 +22327,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22467,7 +22472,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22605,7 +22610,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22677,7 +22682,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22742,7 +22747,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22817,7 +22822,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22906,7 +22911,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22998,7 +23003,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23207,7 +23212,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23407,7 +23412,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23536,7 +23541,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23603,7 +23608,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23691,7 +23696,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23865,7 +23870,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24072,7 +24077,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24147,7 +24152,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24198,7 +24203,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24406,7 +24411,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24606,7 +24611,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24727,7 +24732,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24796,7 +24801,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24891,7 +24896,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25108,7 +25113,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25316,7 +25321,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25443,7 +25448,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25521,7 +25526,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py index 2bc50f8f4d79..484b278e1475 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_01_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1293,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1496,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1542,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2134,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2251,7 +2256,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2753,7 +2758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2995,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3079,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3259,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3552,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3875,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_01_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4124,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4375,7 +4380,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py index bfcf8b32944e..08b25fb91a2b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_01_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2268,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2461,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2656,7 +2661,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3016,7 +3021,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3248,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3295,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3412,7 +3417,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3706,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,7 +3911,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3952,7 +3957,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4060,7 +4065,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4137,7 +4142,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4226,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4823,7 +4828,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5015,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5215,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_01_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5261,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5369,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5446,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5515,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5704,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py index 3b9f02cb1278..580aea0fae52 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -208,6 +209,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -248,7 +253,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,7 +352,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +454,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -552,7 +557,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -622,7 +627,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +818,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -997,7 +1002,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1117,7 +1122,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1170,7 +1175,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1376,7 +1381,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1575,7 +1580,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1641,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1717,7 +1722,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1807,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1888,7 +1893,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1966,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2345,7 +2350,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2521,7 +2526,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2627,7 +2632,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2999,7 +3004,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3176,7 +3181,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3360,7 +3365,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3567,7 +3572,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3692,7 +3697,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3750,7 +3755,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3949,7 +3954,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4159,7 +4164,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4365,7 +4370,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4491,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4553,7 +4558,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4641,7 +4646,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4736,7 +4741,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4833,7 +4838,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4941,7 +4946,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5014,7 +5019,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5233,7 +5238,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5443,7 +5448,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5570,7 +5575,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5640,7 +5645,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5716,7 +5721,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5911,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6006,7 +6011,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6112,7 +6117,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6321,7 +6326,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6454,7 +6459,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6515,7 +6520,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6598,7 +6603,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6674,7 +6679,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6787,7 +6792,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6886,7 +6891,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6985,7 +6990,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7109,7 +7114,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7157,7 +7162,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7274,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7317,7 +7322,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7541,7 +7546,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7750,7 +7755,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7951,7 +7956,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8072,7 +8077,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8133,7 +8138,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8216,7 +8221,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8286,7 +8291,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8481,7 +8486,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8675,7 +8680,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8858,7 +8863,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8980,7 +8985,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9038,7 +9043,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9084,7 +9089,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9180,7 +9185,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9297,7 +9302,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9370,7 +9375,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9470,7 +9475,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9557,7 +9562,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9624,7 +9629,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9726,7 +9731,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9819,7 +9824,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9912,7 +9917,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10005,7 +10010,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10102,7 +10107,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10312,7 +10317,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10359,7 +10364,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10465,7 +10470,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10507,7 +10512,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10620,7 +10625,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10815,7 +10820,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11040,7 +11045,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11120,7 +11125,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11182,7 +11187,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11235,7 +11240,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11293,7 +11298,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11351,7 +11356,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11437,7 +11442,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11523,7 +11528,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11589,7 +11594,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11647,7 +11652,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11709,7 +11714,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11793,7 +11798,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11852,7 +11857,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11925,7 +11930,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12066,7 +12071,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12194,7 +12199,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12263,7 +12268,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12314,7 +12319,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12377,7 +12382,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12457,7 +12462,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12542,7 +12547,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12702,7 +12707,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12837,7 +12842,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12906,7 +12911,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12967,7 +12972,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13027,7 +13032,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13109,7 +13114,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13272,7 +13277,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13404,7 +13409,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13473,7 +13478,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13536,7 +13541,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13600,7 +13605,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13679,7 +13684,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13770,7 +13775,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13973,7 +13978,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14167,7 +14172,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14289,7 +14294,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14356,7 +14361,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14423,7 +14428,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14546,7 +14551,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14649,7 +14654,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14732,7 +14737,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14868,7 +14873,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15001,7 +15006,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15070,7 +15075,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15123,7 +15128,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15182,7 +15187,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15249,7 +15254,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15430,7 +15435,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15611,7 +15616,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15717,7 +15722,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15777,7 +15782,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15855,7 +15860,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16019,7 +16024,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16154,7 +16159,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16212,7 +16217,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16329,7 +16334,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16391,7 +16396,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16472,7 +16477,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16563,7 +16568,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16757,7 +16762,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16878,7 +16883,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17023,7 +17028,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17161,7 +17166,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17233,7 +17238,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17298,7 +17303,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17373,7 +17378,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17462,7 +17467,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17554,7 +17559,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17763,7 +17768,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17963,7 +17968,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18092,7 +18097,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18159,7 +18164,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18247,7 +18252,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18422,7 +18427,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18630,7 +18635,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18705,7 +18710,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18756,7 +18761,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18964,7 +18969,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19164,7 +19169,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19285,7 +19290,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19354,7 +19359,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19449,7 +19454,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19666,7 +19671,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19874,7 +19879,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20001,7 +20006,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20079,7 +20084,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_compute_management_client_enums.py index 57fd9cf91250..ed925933c1b4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_compute_management_client_enums.py @@ -626,9 +626,9 @@ class VirtualMachineSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py index acfa482cb9e1..e9332189f1ba 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py @@ -2449,7 +2449,7 @@ class DiagnosticsProfile(_serialization.Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2463,7 +2463,7 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2823,9 +2823,9 @@ class HardwareProfile(_serialization.Model): deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -2890,9 +2890,9 @@ def __init__( deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -4815,7 +4815,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4906,7 +4906,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4967,7 +4967,7 @@ class OSProfileProvisioningData(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5002,7 +5002,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7237,7 +7237,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7257,7 +7257,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -12542,7 +12542,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12626,7 +12626,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py index d32be3e6587b..10729a02a3eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6046,7 +6051,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6145,7 +6150,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6246,7 +6251,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6349,7 +6354,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6419,7 +6424,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6610,7 +6615,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6794,7 +6799,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6914,7 +6919,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6967,7 +6972,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7173,7 +7178,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7372,7 +7377,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7433,7 +7438,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7514,7 +7519,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7599,7 +7604,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7685,7 +7690,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7758,7 +7763,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7962,7 +7967,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8142,7 +8147,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8318,7 +8323,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8422,7 +8427,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8605,7 +8610,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8794,7 +8799,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8971,7 +8976,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9155,7 +9160,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9362,7 +9367,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9487,7 +9492,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9545,7 +9550,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9744,7 +9749,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9954,7 +9959,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10160,7 +10165,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10281,7 +10286,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10348,7 +10353,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10436,7 +10441,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10529,7 +10534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10631,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10739,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10807,7 +10812,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11026,7 +11031,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11236,7 +11241,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11363,7 +11368,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11433,7 +11438,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11514,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11699,7 +11704,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11799,7 +11804,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11905,7 +11910,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12114,7 +12119,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12247,7 +12252,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12308,7 +12313,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12391,7 +12396,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12467,7 +12472,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12580,7 +12585,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12679,7 +12684,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12778,7 +12783,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12902,7 +12907,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12950,7 +12955,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13062,7 +13067,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13110,7 +13115,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13331,7 +13336,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13540,7 +13545,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13741,7 +13746,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13862,7 +13867,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13923,7 +13928,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14005,7 +14010,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14075,7 +14080,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14270,7 +14275,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14461,7 +14466,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14641,7 +14646,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14763,7 +14768,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14821,7 +14826,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14867,7 +14872,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14961,7 +14966,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15078,7 +15083,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15150,7 +15155,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15249,7 +15254,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15335,7 +15340,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15402,7 +15407,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15504,7 +15509,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15597,7 +15602,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15690,7 +15695,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15783,7 +15788,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15880,7 +15885,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16090,7 +16095,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16137,7 +16142,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16241,7 +16246,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16283,7 +16288,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16396,7 +16401,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16591,7 +16596,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16813,7 +16818,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16893,7 +16898,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16955,7 +16960,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17008,7 +17013,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17066,7 +17071,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17122,7 +17127,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17208,7 +17213,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17294,7 +17299,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17360,7 +17365,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17418,7 +17423,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17480,7 +17485,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17564,7 +17569,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17623,7 +17628,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17696,7 +17701,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17837,7 +17842,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17965,7 +17970,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18034,7 +18039,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18085,7 +18090,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18147,7 +18152,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18226,7 +18231,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18310,7 +18315,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18470,7 +18475,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18605,7 +18610,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18674,7 +18679,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18735,7 +18740,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18795,7 +18800,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18877,7 +18882,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19040,7 +19045,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19172,7 +19177,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19241,7 +19246,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19304,7 +19309,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19365,7 +19370,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19443,7 +19448,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19534,7 +19539,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19734,7 +19739,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19925,7 +19930,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20047,7 +20052,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20113,7 +20118,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20180,7 +20185,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20303,7 +20308,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20406,7 +20411,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20489,7 +20494,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20625,7 +20630,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20758,7 +20763,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20827,7 +20832,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20878,7 +20883,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20937,7 +20942,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21004,7 +21009,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21185,7 +21190,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21366,7 +21371,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21472,7 +21477,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21532,7 +21537,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21610,7 +21615,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21774,7 +21779,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21909,7 +21914,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21967,7 +21972,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22084,7 +22089,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22146,7 +22151,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22227,7 +22232,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22318,7 +22323,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22512,7 +22517,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22633,7 +22638,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22778,7 +22783,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22916,7 +22921,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22988,7 +22993,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23053,7 +23058,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23128,7 +23133,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23217,7 +23222,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23309,7 +23314,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23518,7 +23523,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23718,7 +23723,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23847,7 +23852,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23914,7 +23919,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24002,7 +24007,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24176,7 +24181,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24383,7 +24388,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24458,7 +24463,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24509,7 +24514,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24717,7 +24722,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24917,7 +24922,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25038,7 +25043,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25107,7 +25112,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25202,7 +25207,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25419,7 +25424,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25627,7 +25632,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25754,7 +25759,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25832,7 +25837,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py index 0ae26d870891..973eb7d554f3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_04_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1293,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1496,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1542,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2134,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2251,7 +2256,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2753,7 +2758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2995,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3079,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3259,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3552,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3875,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_04_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4124,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4375,7 +4380,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py index 492cfbf5ca13..7564010419a6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_04_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2268,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2461,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2656,7 +2661,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3016,7 +3021,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3248,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3295,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3412,7 +3417,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3706,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,7 +3911,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3952,7 +3957,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4060,7 +4065,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4137,7 +4142,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4226,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4823,7 +4828,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5015,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5215,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_04_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5261,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5369,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5446,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5515,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5704,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py index 187f75352f77..67d1b45f3090 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -208,6 +209,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -248,7 +253,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,7 +352,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +454,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -552,7 +557,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -622,7 +627,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +818,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -997,7 +1002,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1117,7 +1122,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1170,7 +1175,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1376,7 +1381,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1575,7 +1580,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1641,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1717,7 +1722,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1807,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1888,7 +1893,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1966,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2345,7 +2350,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2521,7 +2526,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2627,7 +2632,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2999,7 +3004,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3176,7 +3181,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3360,7 +3365,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3567,7 +3572,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3692,7 +3697,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3750,7 +3755,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3949,7 +3954,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4159,7 +4164,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4365,7 +4370,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4491,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4553,7 +4558,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4641,7 +4646,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4736,7 +4741,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4833,7 +4838,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4941,7 +4946,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5014,7 +5019,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5233,7 +5238,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5443,7 +5448,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5570,7 +5575,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5640,7 +5645,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5716,7 +5721,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5911,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6006,7 +6011,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6112,7 +6117,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6321,7 +6326,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6454,7 +6459,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6515,7 +6520,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6598,7 +6603,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6674,7 +6679,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6787,7 +6792,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6886,7 +6891,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6985,7 +6990,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7109,7 +7114,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7157,7 +7162,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7274,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7317,7 +7322,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7541,7 +7546,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7750,7 +7755,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7951,7 +7956,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8072,7 +8077,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8133,7 +8138,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8216,7 +8221,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8286,7 +8291,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8481,7 +8486,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8675,7 +8680,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8858,7 +8863,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8980,7 +8985,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9038,7 +9043,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9084,7 +9089,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9180,7 +9185,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9297,7 +9302,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9370,7 +9375,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9470,7 +9475,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9557,7 +9562,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9624,7 +9629,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9726,7 +9731,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9819,7 +9824,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9912,7 +9917,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10005,7 +10010,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10102,7 +10107,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10312,7 +10317,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10359,7 +10364,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10465,7 +10470,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10507,7 +10512,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10620,7 +10625,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10815,7 +10820,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11040,7 +11045,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11120,7 +11125,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11182,7 +11187,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11235,7 +11240,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11293,7 +11298,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11351,7 +11356,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11437,7 +11442,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11523,7 +11528,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11589,7 +11594,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11647,7 +11652,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11709,7 +11714,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11793,7 +11798,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11852,7 +11857,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11925,7 +11930,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12066,7 +12071,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12194,7 +12199,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12263,7 +12268,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12314,7 +12319,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12377,7 +12382,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12457,7 +12462,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12542,7 +12547,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12702,7 +12707,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12837,7 +12842,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12906,7 +12911,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12967,7 +12972,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13027,7 +13032,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13109,7 +13114,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13272,7 +13277,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13404,7 +13409,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13473,7 +13478,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13536,7 +13541,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13600,7 +13605,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13679,7 +13684,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13770,7 +13775,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13973,7 +13978,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14167,7 +14172,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14289,7 +14294,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14356,7 +14361,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14423,7 +14428,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14546,7 +14551,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14649,7 +14654,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14732,7 +14737,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14868,7 +14873,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15001,7 +15006,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15070,7 +15075,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15123,7 +15128,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15182,7 +15187,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15249,7 +15254,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15430,7 +15435,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15611,7 +15616,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15717,7 +15722,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15778,7 +15783,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15856,7 +15861,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16020,7 +16025,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16155,7 +16160,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16213,7 +16218,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16330,7 +16335,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16392,7 +16397,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16473,7 +16478,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16564,7 +16569,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16758,7 +16763,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16879,7 +16884,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17024,7 +17029,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17162,7 +17167,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17234,7 +17239,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17299,7 +17304,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17374,7 +17379,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17463,7 +17468,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17555,7 +17560,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17764,7 +17769,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17964,7 +17969,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18093,7 +18098,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18160,7 +18165,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18248,7 +18253,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18423,7 +18428,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18631,7 +18636,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18706,7 +18711,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18757,7 +18762,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18965,7 +18970,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19165,7 +19170,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19286,7 +19291,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19355,7 +19360,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19450,7 +19455,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19667,7 +19672,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19875,7 +19880,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20002,7 +20007,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20080,7 +20085,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_compute_management_client_enums.py index ef5fd9ac2fde..21e2ee5f4df2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_compute_management_client_enums.py @@ -656,9 +656,9 @@ class VirtualMachineSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py index 300894f449b8..b085ff2ac5b6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py @@ -2449,7 +2449,7 @@ class DiagnosticsProfile(_serialization.Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2463,7 +2463,7 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2823,9 +2823,9 @@ class HardwareProfile(_serialization.Model): deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -2890,9 +2890,9 @@ def __init__( deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -4815,7 +4815,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4906,7 +4906,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -4967,7 +4967,7 @@ class OSProfileProvisioningData(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5002,7 +5002,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7237,7 +7237,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7257,7 +7257,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -12608,7 +12608,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -12692,7 +12692,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py index fdec4ad707bb..2fc1c4b86e32 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6046,7 +6051,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6145,7 +6150,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6246,7 +6251,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6349,7 +6354,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6419,7 +6424,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6610,7 +6615,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6794,7 +6799,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6914,7 +6919,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6967,7 +6972,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7173,7 +7178,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7372,7 +7377,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7433,7 +7438,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7514,7 +7519,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7599,7 +7604,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7685,7 +7690,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7758,7 +7763,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7962,7 +7967,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8142,7 +8147,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8318,7 +8323,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8422,7 +8427,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8605,7 +8610,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8794,7 +8799,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8971,7 +8976,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9155,7 +9160,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9362,7 +9367,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9487,7 +9492,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9545,7 +9550,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9744,7 +9749,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9954,7 +9959,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10160,7 +10165,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10281,7 +10286,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10348,7 +10353,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10436,7 +10441,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10529,7 +10534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10631,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10739,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10807,7 +10812,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11026,7 +11031,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11236,7 +11241,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11363,7 +11368,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11433,7 +11438,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11514,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11699,7 +11704,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11799,7 +11804,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11905,7 +11910,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12114,7 +12119,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12247,7 +12252,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12308,7 +12313,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12391,7 +12396,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12467,7 +12472,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12580,7 +12585,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12679,7 +12684,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12778,7 +12783,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12902,7 +12907,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12950,7 +12955,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13062,7 +13067,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13110,7 +13115,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13331,7 +13336,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13540,7 +13545,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13741,7 +13746,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13862,7 +13867,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13923,7 +13928,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14005,7 +14010,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14075,7 +14080,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14270,7 +14275,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14461,7 +14466,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14641,7 +14646,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14763,7 +14768,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14821,7 +14826,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14867,7 +14872,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14961,7 +14966,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15078,7 +15083,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15150,7 +15155,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15249,7 +15254,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15335,7 +15340,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15402,7 +15407,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15504,7 +15509,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15597,7 +15602,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15690,7 +15695,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15783,7 +15788,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15880,7 +15885,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16090,7 +16095,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16137,7 +16142,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16241,7 +16246,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16283,7 +16288,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16396,7 +16401,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16591,7 +16596,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16813,7 +16818,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16893,7 +16898,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16955,7 +16960,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17008,7 +17013,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17066,7 +17071,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17122,7 +17127,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17208,7 +17213,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17294,7 +17299,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17360,7 +17365,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17418,7 +17423,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17480,7 +17485,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17564,7 +17569,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17623,7 +17628,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17696,7 +17701,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17837,7 +17842,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17965,7 +17970,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18034,7 +18039,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18085,7 +18090,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18147,7 +18152,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18226,7 +18231,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18310,7 +18315,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18470,7 +18475,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18605,7 +18610,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18674,7 +18679,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18735,7 +18740,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18795,7 +18800,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18877,7 +18882,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19040,7 +19045,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19172,7 +19177,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19241,7 +19246,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19304,7 +19309,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19365,7 +19370,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19443,7 +19448,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19534,7 +19539,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19734,7 +19739,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19925,7 +19930,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20047,7 +20052,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20113,7 +20118,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20180,7 +20185,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20303,7 +20308,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20406,7 +20411,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20489,7 +20494,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20625,7 +20630,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20758,7 +20763,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20827,7 +20832,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20878,7 +20883,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20937,7 +20942,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21004,7 +21009,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21185,7 +21190,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21366,7 +21371,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21472,7 +21477,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21533,7 +21538,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21611,7 +21616,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21775,7 +21780,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21910,7 +21915,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21968,7 +21973,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22085,7 +22090,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22147,7 +22152,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22228,7 +22233,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22319,7 +22324,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22513,7 +22518,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22634,7 +22639,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22779,7 +22784,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22917,7 +22922,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22989,7 +22994,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23054,7 +23059,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23129,7 +23134,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23218,7 +23223,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23310,7 +23315,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23519,7 +23524,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23719,7 +23724,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23848,7 +23853,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23915,7 +23920,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24003,7 +24008,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24177,7 +24182,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24384,7 +24389,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24459,7 +24464,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24510,7 +24515,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24718,7 +24723,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24918,7 +24923,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25039,7 +25044,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25108,7 +25113,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25203,7 +25208,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25420,7 +25425,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25628,7 +25633,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25755,7 +25760,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25833,7 +25838,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py index 1fd6035e28a9..031d139856e7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_shared_gallery_images_list_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +299,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +508,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +556,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +662,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,7 +739,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +830,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1044,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1258,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1305,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1513,7 +1518,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1749,7 +1754,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2000,7 +2005,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2192,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2286,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,7 +2504,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2725,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2772,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3224,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3472,7 +3477,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3526,7 +3531,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3660,7 +3665,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3753,7 +3758,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3980,7 +3985,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4154,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4236,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4330,7 +4335,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4423,7 +4428,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,7 +4506,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4647,7 +4652,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4758,7 +4763,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4827,7 +4832,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py index 45f43b070b78..2aa1cba6933e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1395,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1592,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> _models.Gallery: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1793,7 +1798,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1846,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1947,7 +1952,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2029,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2115,7 +2120,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2329,7 +2334,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImage: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2590,7 +2595,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2807,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3043,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryImageVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3289,7 +3294,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3348,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_image_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3476,7 +3481,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3570,7 +3575,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3793,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplication: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4009,7 +4014,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4061,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4175,7 +4180,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4269,7 +4274,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4512,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> _models.GalleryApplicationVersion: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4760,7 +4765,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4814,7 +4819,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements gallery_application_version_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,7 +4953,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5041,7 +5046,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> _models.SharingUpdate: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5269,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5340,7 +5345,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5432,7 +5437,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5519,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5613,7 +5618,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5706,7 +5711,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5784,7 +5789,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5864,7 +5869,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5928,7 +5933,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6039,7 +6044,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6108,7 +6113,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py index 69f4417a55db..17a28c7abbb0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -213,6 +214,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -253,7 +258,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +357,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +459,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +562,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +864,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1078,7 +1083,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1198,7 +1203,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1251,7 +1256,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1457,7 +1462,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1661,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1717,7 +1722,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1798,7 +1803,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1969,7 +1974,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2246,7 +2251,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2426,7 +2431,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2607,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2891,7 +2896,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3080,7 +3085,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3257,7 +3262,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3441,7 +3446,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3624,7 +3629,7 @@ async def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-retu vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3834,7 +3839,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_09_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3959,7 +3964,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4017,7 +4022,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4216,7 +4221,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4426,7 +4431,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4632,7 +4637,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4753,7 +4758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4825,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4908,7 +4913,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5003,7 +5008,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5100,7 +5105,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5208,7 +5213,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5281,7 +5286,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5500,7 +5505,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5710,7 +5715,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5842,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5907,7 +5912,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5983,7 +5988,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6173,7 +6178,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6273,7 +6278,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6375,7 +6380,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6484,7 +6489,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6728,7 +6733,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6866,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6922,7 +6927,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7005,7 +7010,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7081,7 +7086,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7194,7 +7199,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7293,7 +7298,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7392,7 +7397,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7516,7 +7521,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7564,7 +7569,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7676,7 +7681,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7724,7 +7729,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7935,7 +7940,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8159,7 +8164,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8368,7 +8373,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8569,7 +8574,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8690,7 +8695,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8751,7 +8756,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8834,7 +8839,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8909,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9102,7 +9107,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9339,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9552,7 +9557,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9674,7 +9679,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9732,7 +9737,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9778,7 +9783,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9874,7 +9879,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9991,7 +9996,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10064,7 +10069,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10164,7 +10169,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10251,7 +10256,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10318,7 +10323,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10420,7 +10425,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10513,7 +10518,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10606,7 +10611,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10699,7 +10704,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10796,7 +10801,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11006,7 +11011,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11053,7 +11058,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11164,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11201,7 +11206,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11314,7 +11319,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11514,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11707,7 +11712,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11932,7 +11937,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12012,7 +12017,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12074,7 +12079,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12127,7 +12132,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12185,7 +12190,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12243,7 +12248,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12329,7 +12334,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12415,7 +12420,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12481,7 +12486,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12539,7 +12544,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12601,7 +12606,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12685,7 +12690,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12744,7 +12749,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12817,7 +12822,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12958,7 +12963,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13086,7 +13091,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13155,7 +13160,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13206,7 +13211,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13269,7 +13274,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13349,7 +13354,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13434,7 +13439,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13594,7 +13599,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13729,7 +13734,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13798,7 +13803,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13859,7 +13864,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13919,7 +13924,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14001,7 +14006,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14164,7 +14169,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14296,7 +14301,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14365,7 +14370,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14428,7 +14433,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14492,7 +14497,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14571,7 +14576,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14662,7 +14667,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14865,7 +14870,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15059,7 +15064,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15181,7 +15186,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15248,7 +15253,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15315,7 +15320,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15417,7 +15422,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15544,7 +15549,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15647,7 +15652,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15730,7 +15735,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15866,7 +15871,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15999,7 +16004,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16068,7 +16073,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16121,7 +16126,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16244,7 +16249,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16326,7 +16331,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16507,7 +16512,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16688,7 +16693,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16794,7 +16799,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16855,7 +16860,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16933,7 +16938,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17097,7 +17102,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17232,7 +17237,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17290,7 +17295,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17407,7 +17412,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17469,7 +17474,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17550,7 +17555,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17641,7 +17646,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17835,7 +17840,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17956,7 +17961,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18101,7 +18106,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18239,7 +18244,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18311,7 +18316,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18376,7 +18381,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18451,7 +18456,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18540,7 +18545,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18632,7 +18637,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18841,7 +18846,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19041,7 +19046,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19170,7 +19175,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19237,7 +19242,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19325,7 +19330,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19500,7 +19505,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19708,7 +19713,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19783,7 +19788,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_09_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19834,7 +19839,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20042,7 +20047,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20242,7 +20247,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20363,7 +20368,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20432,7 +20437,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20527,7 +20532,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20744,7 +20749,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20952,7 +20957,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21079,7 +21084,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21157,7 +21162,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_compute_management_client_enums.py index 230c82b699fa..c13042432eb4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_compute_management_client_enums.py @@ -678,9 +678,9 @@ class VirtualMachineSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py index 3350e9c748e6..3da1dfb64fb0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py @@ -2627,7 +2627,7 @@ class DiagnosticsProfile(_serialization.Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2641,7 +2641,7 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -3023,9 +3023,9 @@ class HardwareProfile(_serialization.Model): deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -3090,9 +3090,9 @@ def __init__( deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -5015,7 +5015,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5106,7 +5106,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5167,7 +5167,7 @@ class OSProfileProvisioningData(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5202,7 +5202,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7625,7 +7625,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7645,7 +7645,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -13054,7 +13054,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -13138,7 +13138,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py index fb07b81e6815..b12cde0e18e5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6267,7 +6272,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6366,7 +6371,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6467,7 +6472,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6570,7 +6575,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6643,7 +6648,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6872,7 +6877,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7091,7 +7096,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7211,7 +7216,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7264,7 +7269,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7470,7 +7475,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7669,7 +7674,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7730,7 +7735,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7811,7 +7816,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7896,7 +7901,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7982,7 +7987,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8055,7 +8060,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8259,7 +8264,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8439,7 +8444,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8615,7 +8620,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8719,7 +8724,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8902,7 +8907,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9091,7 +9096,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9268,7 +9273,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9452,7 +9457,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9635,7 +9640,7 @@ def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-sta vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9845,7 +9850,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_09_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9970,7 +9975,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10028,7 +10033,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10227,7 +10232,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10437,7 +10442,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10643,7 +10648,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10764,7 +10769,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10831,7 +10836,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10919,7 +10924,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11012,7 +11017,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11109,7 +11114,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11217,7 +11222,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11290,7 +11295,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11514,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11719,7 +11724,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11846,7 +11851,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11916,7 +11921,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11992,7 +11997,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12182,7 +12187,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12282,7 +12287,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12384,7 +12389,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12493,7 +12498,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12737,7 +12742,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12870,7 +12875,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12931,7 +12936,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13014,7 +13019,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13090,7 +13095,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13203,7 +13208,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13302,7 +13307,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13401,7 +13406,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13525,7 +13530,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13573,7 +13578,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13685,7 +13690,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13733,7 +13738,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13941,7 +13946,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14162,7 +14167,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14371,7 +14376,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14572,7 +14577,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14693,7 +14698,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14754,7 +14759,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14836,7 +14841,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14906,7 +14911,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15104,7 +15109,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15333,7 +15338,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15548,7 +15553,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15670,7 +15675,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15728,7 +15733,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15774,7 +15779,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15868,7 +15873,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15985,7 +15990,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16057,7 +16062,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16156,7 +16161,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16242,7 +16247,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16309,7 +16314,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16411,7 +16416,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16504,7 +16509,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16597,7 +16602,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16690,7 +16695,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16787,7 +16792,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16997,7 +17002,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17044,7 +17049,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17148,7 +17153,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17190,7 +17195,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17303,7 +17308,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17498,7 +17503,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17693,7 +17698,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17915,7 +17920,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17995,7 +18000,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18057,7 +18062,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18110,7 +18115,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18168,7 +18173,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18224,7 +18229,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_09_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18310,7 +18315,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18396,7 +18401,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18462,7 +18467,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18520,7 +18525,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18582,7 +18587,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18666,7 +18671,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18725,7 +18730,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18798,7 +18803,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18939,7 +18944,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19067,7 +19072,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19136,7 +19141,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19187,7 +19192,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19249,7 +19254,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19328,7 +19333,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19412,7 +19417,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19572,7 +19577,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19707,7 +19712,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19776,7 +19781,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19837,7 +19842,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19897,7 +19902,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19979,7 +19984,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20142,7 +20147,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20274,7 +20279,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20343,7 +20348,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20406,7 +20411,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20467,7 +20472,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20545,7 +20550,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20636,7 +20641,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20836,7 +20841,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21027,7 +21032,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21149,7 +21154,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21215,7 +21220,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21282,7 +21287,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21384,7 +21389,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21511,7 +21516,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21614,7 +21619,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21697,7 +21702,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21833,7 +21838,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21966,7 +21971,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22035,7 +22040,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22086,7 +22091,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22209,7 +22214,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22291,7 +22296,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22472,7 +22477,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22653,7 +22658,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22759,7 +22764,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22820,7 +22825,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22898,7 +22903,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23062,7 +23067,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23197,7 +23202,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23255,7 +23260,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23372,7 +23377,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23434,7 +23439,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23515,7 +23520,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23606,7 +23611,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23800,7 +23805,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23921,7 +23926,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24066,7 +24071,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24204,7 +24209,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24276,7 +24281,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24341,7 +24346,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24416,7 +24421,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24505,7 +24510,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24597,7 +24602,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24806,7 +24811,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25006,7 +25011,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25135,7 +25140,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25202,7 +25207,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25290,7 +25295,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25464,7 +25469,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25671,7 +25676,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25746,7 +25751,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_09_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25797,7 +25802,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26005,7 +26010,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26205,7 +26210,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26326,7 +26331,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26395,7 +26400,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26490,7 +26495,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26707,7 +26712,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26915,7 +26920,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27042,7 +27047,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27120,7 +27125,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py index ac27afd836b6..d109c59da6bc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -72,6 +73,10 @@ build_snapshots_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +287,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_10_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +527,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +712,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +781,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +973,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1097,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1293,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1496,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1542,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,7 +1653,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1731,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1809,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2134,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2251,7 +2256,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2348,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2543,7 +2548,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2753,7 +2758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2804,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2917,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2995,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3074,7 +3079,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3189,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3259,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3328,7 +3333,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3552,7 @@ async def _revoke_access_initial( # pylint: disable=inconsistent-return-stateme disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3685,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3875,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_10_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4124,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4233,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4375,7 +4380,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py index 8ef5d7de553d..ed7ae2d328f3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1275,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1463,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> _models.Disk: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1657,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_10_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1703,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1811,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1952,7 +1957,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2146,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2268,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2461,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskAccess: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2656,7 +2661,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2702,7 +2707,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2810,7 +2815,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2887,7 +2892,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3016,7 +3021,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> _models.PrivateEndpointConnection: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3248,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3295,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3412,7 +3417,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3509,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3706,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> _models.DiskEncryptionSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,7 +3911,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3952,7 +3957,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4060,7 +4065,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4137,7 +4142,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4226,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4336,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4479,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4695,7 @@ def _revoke_access_initial( # pylint: disable=inconsistent-return-statements disk_restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4823,7 +4828,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5015,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> _models.Snapshot: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5215,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_10_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5261,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5369,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5446,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5515,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Optional[_models.AccessUri]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5704,7 @@ def get_long_running_output(pipeline_response): def _revoke_access_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py index 99d6c5c9fdaf..e5754a47ce68 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "31.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py index dbb16a4647f5..bb098f1ef260 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -213,6 +214,10 @@ build_virtual_machines_update_request, ) +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -253,7 +258,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +357,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +459,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +562,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +864,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1078,7 +1083,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1198,7 +1203,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1251,7 +1256,7 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1457,7 +1462,7 @@ async def _delete_instances_initial( # pylint: disable=inconsistent-return-stat force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1661,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1717,7 +1722,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1798,7 +1803,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1888,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1969,7 +1974,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2246,7 +2251,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2426,7 +2431,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2607,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2713,7 @@ async def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2891,7 +2896,7 @@ async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-s vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3080,7 +3085,7 @@ async def _update_instances_initial( # pylint: disable=inconsistent-return-stat vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3257,7 +3262,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3441,7 +3446,7 @@ async def _reimage_all_initial( # pylint: disable=inconsistent-return-statement vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3624,7 +3629,7 @@ async def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-retu vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3834,7 +3839,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2024_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3959,7 +3964,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4017,7 +4022,7 @@ async def _set_orchestration_service_state_initial( # pylint: disable=inconsist parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4216,7 +4221,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4426,7 +4431,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4632,7 +4637,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4753,7 +4758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4825,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4908,7 +4913,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5003,7 +5008,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5100,7 +5105,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5208,7 +5213,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5281,7 +5286,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5500,7 +5505,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5710,7 +5715,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5842,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5907,7 +5912,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5983,7 +5988,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6173,7 +6178,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6273,7 +6278,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6375,7 +6380,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6484,7 +6489,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6728,7 +6733,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6866,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6922,7 +6927,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7005,7 +7010,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7081,7 +7086,7 @@ async def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7194,7 +7199,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7293,7 +7298,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7392,7 +7397,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7516,7 +7521,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7564,7 +7569,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7676,7 +7681,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7724,7 +7729,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7935,7 +7940,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8159,7 +8164,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8368,7 +8373,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8569,7 +8574,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8690,7 +8695,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8751,7 +8756,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8834,7 +8839,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8909,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9102,7 +9107,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9339,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9552,7 +9557,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9674,7 +9679,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9732,7 +9737,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9778,7 +9783,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9874,7 +9879,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9925,8 +9930,7 @@ async def begin_deallocate( :type resource_group_name: str :param vm_name: The name of the virtual machine. Required. :type vm_name: str - :keyword hibernate: Optional parameter to hibernate a virtual machine. (Feature in Preview). - Default value is None. + :keyword hibernate: Optional parameter to hibernate a virtual machine. Default value is None. :paramtype hibernate: bool :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] @@ -9991,7 +9995,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10064,7 +10068,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10164,7 +10168,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10251,7 +10255,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10318,7 +10322,7 @@ async def get_next(next_link=None): async def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10420,7 +10424,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10513,7 +10517,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10606,7 +10610,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10699,7 +10703,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10796,7 +10800,7 @@ async def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11006,7 +11010,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11053,7 +11057,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11163,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11201,7 +11205,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11314,7 +11318,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11513,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11707,7 +11711,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11932,7 +11936,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12012,7 +12016,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12074,7 +12078,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12127,7 +12131,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12185,7 +12189,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12243,7 +12247,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12329,7 +12333,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12415,7 +12419,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12481,7 +12485,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12539,7 +12543,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12601,7 +12605,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12685,7 +12689,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12744,7 +12748,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12817,7 +12821,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12958,7 +12962,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13086,7 +13090,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13155,7 +13159,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13206,7 +13210,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13269,7 +13273,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13349,7 +13353,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13434,7 +13438,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13594,7 +13598,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13729,7 +13733,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13798,7 +13802,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13859,7 +13863,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13919,7 +13923,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14001,7 +14005,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14164,7 +14168,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14296,7 +14300,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14365,7 +14369,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14428,7 +14432,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14492,7 +14496,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14571,7 +14575,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14662,7 +14666,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14865,7 +14869,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15059,7 +15063,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15181,7 +15185,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15248,7 +15252,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15315,7 +15319,7 @@ async def get_next(next_link=None): async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15417,7 +15421,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15544,7 +15548,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15647,7 +15651,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15730,7 +15734,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15866,7 +15870,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15999,7 +16003,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16068,7 +16072,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16121,7 +16125,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16244,7 +16248,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16326,7 +16330,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16507,7 +16511,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16688,7 +16692,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16794,7 +16798,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16855,7 +16859,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16933,7 +16937,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17097,7 +17101,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17232,7 +17236,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17290,7 +17294,7 @@ async def update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17407,7 +17411,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17469,7 +17473,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17550,7 +17554,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17641,7 +17645,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17835,7 +17839,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17956,7 +17960,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18101,7 +18105,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18239,7 +18243,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18311,7 +18315,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18376,7 +18380,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18451,7 +18455,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18553,7 +18557,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18646,7 +18650,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18855,7 +18859,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19055,7 +19059,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19184,7 +19188,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19251,7 +19255,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19339,7 +19343,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19514,7 +19518,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19722,7 +19726,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19797,7 +19801,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2024_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19848,7 +19852,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20056,7 +20060,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20256,7 +20260,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20377,7 +20381,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20446,7 +20450,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20541,7 +20545,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20758,7 +20762,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20966,7 +20970,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21093,7 +21097,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21171,7 +21175,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py index 124d2544f7cd..b61694c9ef8f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py @@ -150,6 +150,7 @@ from ._models_py3 import ScheduledEventsPolicy from ._models_py3 import ScheduledEventsProfile from ._models_py3 import SecurityPostureReference +from ._models_py3 import SecurityPostureReferenceUpdate from ._models_py3 import SecurityProfile from ._models_py3 import ServiceArtifactReference from ._models_py3 import Sku @@ -514,6 +515,7 @@ "ScheduledEventsPolicy", "ScheduledEventsProfile", "SecurityPostureReference", + "SecurityPostureReferenceUpdate", "SecurityProfile", "ServiceArtifactReference", "Sku", diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_compute_management_client_enums.py index 045c9156d325..29045f4f5fbd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_compute_management_client_enums.py @@ -693,9 +693,9 @@ class VirtualMachineSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py index bf093938f3bd..342d5790536e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py @@ -2692,7 +2692,7 @@ class DiagnosticsProfile(_serialization.Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -2706,7 +2706,7 @@ class DiagnosticsProfile(_serialization.Model): def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, **kwargs: Any) -> None: """ :keyword boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view - Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being + Console Output and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. @@ -3114,9 +3114,9 @@ class HardwareProfile(_serialization.Model): deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -3181,9 +3181,9 @@ def __init__( deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: `List all available virtual machine sizes in an availability set - `_\ , `List + `_\\ , `List all available virtual machine sizes in a region - `_\ , `List all available + `_\\ , `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -5108,7 +5108,7 @@ class OSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5199,7 +5199,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5260,7 +5260,7 @@ class OSProfileProvisioningData(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -5295,7 +5295,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -7658,42 +7658,97 @@ def __init__( class SecurityPostureReference(_serialization.Model): - """Specifies the security posture to be used for all virtual machines in the scale set. Minimum - api-version: 2023-03-01. + """Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01. + + All required parameters must be populated in order to send to server. :ivar id: The security posture reference id in the form of - /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. # pylint: disable=line-too-long + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest. # pylint: disable=line-too-long + Required. :vartype id: str - :ivar exclude_extensions: List of virtual machine extensions to exclude when applying the - Security Posture. - :vartype exclude_extensions: - list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension] + :ivar exclude_extensions: The list of virtual machine extension names to exclude when applying + the security posture. + :vartype exclude_extensions: list[str] + :ivar is_overridable: Whether the security posture can be overridden by the user. + :vartype is_overridable: bool """ + _validation = { + "id": {"required": True}, + } + _attribute_map = { "id": {"key": "id", "type": "str"}, - "exclude_extensions": {"key": "excludeExtensions", "type": "[VirtualMachineExtension]"}, + "exclude_extensions": {"key": "excludeExtensions", "type": "[str]"}, + "is_overridable": {"key": "isOverridable", "type": "bool"}, + } + + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + exclude_extensions: Optional[List[str]] = None, + is_overridable: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The security posture reference id in the form of + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest. # pylint: disable=line-too-long + Required. + :paramtype id: str + :keyword exclude_extensions: The list of virtual machine extension names to exclude when + applying the security posture. + :paramtype exclude_extensions: list[str] + :keyword is_overridable: Whether the security posture can be overridden by the user. + :paramtype is_overridable: bool + """ + super().__init__(**kwargs) + self.id = id + self.exclude_extensions = exclude_extensions + self.is_overridable = is_overridable + + +class SecurityPostureReferenceUpdate(_serialization.Model): + """Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01. + + :ivar id: The security posture reference id in the form of + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest. # pylint: disable=line-too-long + :vartype id: str + :ivar exclude_extensions: The list of virtual machine extension names to exclude when applying + the security posture. + :vartype exclude_extensions: list[str] + :ivar is_overridable: Whether the security posture can be overridden by the user. + :vartype is_overridable: bool + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "exclude_extensions": {"key": "excludeExtensions", "type": "[str]"}, + "is_overridable": {"key": "isOverridable", "type": "bool"}, } def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin - exclude_extensions: Optional[List["_models.VirtualMachineExtension"]] = None, + exclude_extensions: Optional[List[str]] = None, + is_overridable: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword id: The security posture reference id in the form of - /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. # pylint: disable=line-too-long + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest. # pylint: disable=line-too-long :paramtype id: str - :keyword exclude_extensions: List of virtual machine extensions to exclude when applying the - Security Posture. - :paramtype exclude_extensions: - list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension] + :keyword exclude_extensions: The list of virtual machine extension names to exclude when + applying the security posture. + :paramtype exclude_extensions: list[str] + :keyword is_overridable: Whether the security posture can be overridden by the user. + :paramtype is_overridable: bool """ super().__init__(**kwargs) self.id = id self.exclude_extensions = exclude_extensions + self.is_overridable = is_overridable class SecurityProfile(_serialization.Model): @@ -7798,7 +7853,7 @@ class Sku(_serialization.Model): :ivar name: The sku name. :vartype name: str :ivar tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` - Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :vartype tier: str :ivar capacity: Specifies the number of virtual machines in the scale set. @@ -7818,7 +7873,7 @@ def __init__( :keyword name: The sku name. :paramtype name: str :keyword tier: Specifies the tier of virtual machines in a scale set.:code:`
    `:code:`
    ` Possible Values::code:`
    `:code:`
    ` **Standard**\ :code:`
    `:code:`
    ` + />` Possible Values::code:`
    `:code:`
    ` **Standard**\\ :code:`
    `:code:`
    ` **Basic**. :paramtype tier: str :keyword capacity: Specifies the number of virtual machines in the scale set. @@ -13289,7 +13344,7 @@ class VirtualMachineScaleSetOSProfile(_serialization.Model): characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -13373,7 +13428,7 @@ def __init__( characters :code:`
    `:code:`
    ` **Max-length (Linux):** 72 characters :code:`
    `:code:`
    ` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
    ` Has lower characters :code:`
    `Has upper characters :code:`
    ` Has a - digit :code:`
    ` Has a special character (Regex match [\W_]) :code:`
    `:code:`
    ` + digit :code:`
    ` Has a special character (Regex match [\\W_]) :code:`
    `:code:`
    ` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" :code:`
    `:code:`
    ` For resetting the password, see `How to reset the Remote Desktop service or its login password in a @@ -14555,6 +14610,9 @@ class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: di :ivar network_profile: The virtual machine scale set network profile. :vartype network_profile: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :ivar security_posture_reference: The virtual machine scale set security posture reference. + :vartype security_posture_reference: + ~azure.mgmt.compute.v2024_03_01.models.SecurityPostureReferenceUpdate :ivar security_profile: The virtual machine scale set Security profile. :vartype security_profile: ~azure.mgmt.compute.v2024_03_01.models.SecurityProfile :ivar diagnostics_profile: The virtual machine scale set diagnostics profile. @@ -14583,6 +14641,7 @@ class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: di "os_profile": {"key": "osProfile", "type": "VirtualMachineScaleSetUpdateOSProfile"}, "storage_profile": {"key": "storageProfile", "type": "VirtualMachineScaleSetUpdateStorageProfile"}, "network_profile": {"key": "networkProfile", "type": "VirtualMachineScaleSetUpdateNetworkProfile"}, + "security_posture_reference": {"key": "securityPostureReference", "type": "SecurityPostureReferenceUpdate"}, "security_profile": {"key": "securityProfile", "type": "SecurityProfile"}, "diagnostics_profile": {"key": "diagnosticsProfile", "type": "DiagnosticsProfile"}, "extension_profile": {"key": "extensionProfile", "type": "VirtualMachineScaleSetExtensionProfile"}, @@ -14599,6 +14658,7 @@ def __init__( os_profile: Optional["_models.VirtualMachineScaleSetUpdateOSProfile"] = None, storage_profile: Optional["_models.VirtualMachineScaleSetUpdateStorageProfile"] = None, network_profile: Optional["_models.VirtualMachineScaleSetUpdateNetworkProfile"] = None, + security_posture_reference: Optional["_models.SecurityPostureReferenceUpdate"] = None, security_profile: Optional["_models.SecurityProfile"] = None, diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None, extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = None, @@ -14619,6 +14679,9 @@ def __init__( :keyword network_profile: The virtual machine scale set network profile. :paramtype network_profile: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :keyword security_posture_reference: The virtual machine scale set security posture reference. + :paramtype security_posture_reference: + ~azure.mgmt.compute.v2024_03_01.models.SecurityPostureReferenceUpdate :keyword security_profile: The virtual machine scale set Security profile. :paramtype security_profile: ~azure.mgmt.compute.v2024_03_01.models.SecurityProfile :keyword diagnostics_profile: The virtual machine scale set diagnostics profile. @@ -14646,6 +14709,7 @@ def __init__( self.os_profile = os_profile self.storage_profile = storage_profile self.network_profile = network_profile + self.security_posture_reference = security_posture_reference self.security_profile = security_profile self.diagnostics_profile = diagnostics_profile self.extension_profile = extension_profile @@ -15610,8 +15674,8 @@ class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable= Minimum api-version: 2022-11-01. :vartype service_artifact_reference: ~azure.mgmt.compute.v2024_03_01.models.ServiceArtifactReference - :ivar security_posture_reference: Specifies the security posture to be used for all virtual - machines in the scale set. Minimum api-version: 2023-03-01. + :ivar security_posture_reference: Specifies the security posture to be used in the scale set. + Minimum api-version: 2023-03-01. :vartype security_posture_reference: ~azure.mgmt.compute.v2024_03_01.models.SecurityPostureReference :ivar time_created: Specifies the time in which this VM profile for the Virtual Machine Scale @@ -15735,8 +15799,8 @@ def __init__( Minimum api-version: 2022-11-01. :paramtype service_artifact_reference: ~azure.mgmt.compute.v2024_03_01.models.ServiceArtifactReference - :keyword security_posture_reference: Specifies the security posture to be used for all virtual - machines in the scale set. Minimum api-version: 2023-03-01. + :keyword security_posture_reference: Specifies the security posture to be used in the scale + set. Minimum api-version: 2023-03-01. :paramtype security_posture_reference: ~azure.mgmt.compute.v2024_03_01.models.SecurityPostureReference """ diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py index 3adf19c3a60e..1e78fe10b656 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py @@ -7,7 +7,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -32,6 +33,10 @@ from ..._serialization import Serializer from .._vendor import _convert_request +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -6270,7 +6275,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6369,7 +6374,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6470,7 +6475,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6573,7 +6578,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6646,7 +6651,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6875,7 +6880,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSet: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7094,7 +7099,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7214,7 +7219,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7267,7 +7272,7 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7473,7 +7478,7 @@ def _delete_instances_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7672,7 +7677,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7733,7 +7738,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7814,7 +7819,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7899,7 +7904,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7985,7 +7990,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8058,7 +8063,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8262,7 +8267,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8442,7 +8447,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8618,7 +8623,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8722,7 +8727,7 @@ def _redeploy_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8905,7 +8910,7 @@ def _perform_maintenance_initial( # pylint: disable=inconsistent-return-stateme vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9094,7 +9099,7 @@ def _update_instances_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9271,7 +9276,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9455,7 +9460,7 @@ def _reimage_all_initial( # pylint: disable=inconsistent-return-statements vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9638,7 +9643,7 @@ def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-sta vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9848,7 +9853,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2024_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9973,7 +9978,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10031,7 +10036,7 @@ def _set_orchestration_service_state_initial( # pylint: disable=inconsistent-re parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10230,7 +10235,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10440,7 +10445,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10646,7 +10651,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10767,7 +10772,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10834,7 +10839,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10922,7 +10927,7 @@ def __init__(self, *args, **kwargs): def _cancel_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11015,7 +11020,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11112,7 +11117,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11220,7 +11225,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11293,7 +11298,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11512,7 +11517,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineScaleSetVMExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11722,7 +11727,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11849,7 +11854,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11919,7 +11924,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11995,7 +12000,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements ] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12185,7 +12190,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12285,7 +12290,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _approve_rolling_upgrade_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12387,7 +12392,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12496,7 +12501,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachineScaleSetVM: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12740,7 +12745,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12873,7 +12878,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12934,7 +12939,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13017,7 +13022,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13093,7 +13098,7 @@ def _power_off_initial( # pylint: disable=inconsistent-return-statements skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13206,7 +13211,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13305,7 +13310,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13404,7 +13409,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13528,7 +13533,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13576,7 +13581,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13688,7 +13693,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13736,7 +13741,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13944,7 +13949,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14165,7 +14170,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14374,7 +14379,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineExtension: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14575,7 +14580,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14696,7 +14701,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14757,7 +14762,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14839,7 +14844,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14909,7 +14914,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineCaptureResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15107,7 +15112,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15336,7 +15341,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> _models.VirtualMachine: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15551,7 +15556,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15673,7 +15678,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15731,7 +15736,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15777,7 +15782,7 @@ def instance_view( def _convert_to_managed_disks_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15871,7 +15876,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15922,8 +15927,7 @@ def begin_deallocate( :type resource_group_name: str :param vm_name: The name of the virtual machine. Required. :type vm_name: str - :keyword hibernate: Optional parameter to hibernate a virtual machine. (Feature in Preview). - Default value is None. + :keyword hibernate: Optional parameter to hibernate a virtual machine. Default value is None. :paramtype hibernate: bool :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] @@ -15988,7 +15992,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16060,7 +16064,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16159,7 +16163,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16245,7 +16249,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16312,7 +16316,7 @@ def get_next(next_link=None): def _power_off_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16414,7 +16418,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reapply_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16507,7 +16511,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16600,7 +16604,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16693,7 +16697,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16790,7 +16794,7 @@ def _reimage_initial( # pylint: disable=inconsistent-return-statements parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17000,7 +17004,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17047,7 +17051,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17151,7 +17155,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17193,7 +17197,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Optional[_models.VirtualMachineAssessPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17306,7 +17310,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Optional[_models.VirtualMachineInstallPatchesResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17501,7 +17505,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.StorageProfile]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17696,7 +17700,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.RunCommandResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17918,7 +17922,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17998,7 +18002,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18060,7 +18064,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18113,7 +18117,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18171,7 +18175,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18227,7 +18231,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2024_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18313,7 +18317,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18399,7 +18403,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18465,7 +18469,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18523,7 +18527,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18585,7 +18589,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18669,7 +18673,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18728,7 +18732,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18801,7 +18805,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18942,7 +18946,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19070,7 +19074,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19139,7 +19143,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19190,7 +19194,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19252,7 +19256,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19331,7 +19335,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19415,7 +19419,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19575,7 +19579,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19710,7 +19714,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19779,7 +19783,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19840,7 +19844,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19900,7 +19904,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19982,7 +19986,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20145,7 +20149,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20277,7 +20281,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20346,7 +20350,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20409,7 +20413,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20470,7 +20474,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20548,7 +20552,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20639,7 +20643,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20839,7 +20843,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> _models.DedicatedHost: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21030,7 +21034,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21152,7 +21156,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21218,7 +21222,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21285,7 +21289,7 @@ def get_next(next_link=None): def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21387,7 +21391,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21514,7 +21518,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21617,7 +21621,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21700,7 +21704,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21836,7 +21840,7 @@ def create( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21969,7 +21973,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22038,7 +22042,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22089,7 +22093,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22212,7 +22216,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22294,7 +22298,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22475,7 +22479,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> _models.Image: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22656,7 +22660,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, image_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22762,7 +22766,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22823,7 +22827,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22901,7 +22905,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23065,7 +23069,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23200,7 +23204,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23258,7 +23262,7 @@ def update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23375,7 +23379,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23437,7 +23441,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23518,7 +23522,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23609,7 +23613,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> _models.RestorePoint: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23803,7 +23807,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23924,7 +23928,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24069,7 +24073,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24207,7 +24211,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24279,7 +24283,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24344,7 +24348,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24419,7 +24423,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24521,7 +24525,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24614,7 +24618,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> _models.CapacityReservation: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24823,7 +24827,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Optional[_models.CapacityReservation]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25023,7 +25027,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements capacity_reservation_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25152,7 +25156,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25219,7 +25223,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25307,7 +25311,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25481,7 +25485,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Optional[_models.LogAnalyticsOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25688,7 +25692,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25763,7 +25767,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2024_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25814,7 +25818,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26022,7 +26026,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26222,7 +26226,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26343,7 +26347,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26412,7 +26416,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26507,7 +26511,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26724,7 +26728,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> _models.VirtualMachineRunCommand: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26932,7 +26936,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27059,7 +27063,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27137,7 +27141,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py index 39f8d8db46a0..7b449b0b5a3d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py @@ -68,7 +68,9 @@ def main(): "computerNamePrefix": "{vmss-name}", }, "securityPostureReference": { - "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + "excludeExtensions": ["{securityPostureVMExtensionName}"], + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest", + "isOverridable": True, }, "storageProfile": { "imageReference": {