From 740a7b4bc9766f72fa4ea16bf5da1e6800e72d5e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 7 May 2024 05:46:58 +0000 Subject: [PATCH] CodeGen from PR 28999 in Azure/azure-rest-api-specs Merge ece22cac3f6a40ee4ed2bf3ed3a092ac93bece90 into 8dc708fdac9cb97b346ddb38106ac16e668f64cd --- sdk/resources/azure-mgmt-resource/_meta.json | 10 +- .../resource/changes/v2022_05_01/_version.py | 2 +- .../v2022_05_01/aio/operations/_operations.py | 11 +- .../v2022_05_01/operations/_operations.py | 11 +- .../v2019_10_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 23 +- .../operations/_operations.py | 23 +- .../deploymentscripts/v2020_10_01/_version.py | 2 +- .../v2020_10_01/aio/operations/_operations.py | 23 +- .../v2020_10_01/operations/_operations.py | 23 +- .../deploymentscripts/v2023_08_01/_version.py | 2 +- .../v2023_08_01/aio/operations/_operations.py | 23 +- .../v2023_08_01/operations/_operations.py | 23 +- .../v2022_08_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 37 +- .../v2022_08_01_preview/models/_models_py3.py | 4 +- .../operations/_operations.py | 37 +- .../deploymentstacks/v2024_03_01/_version.py | 2 +- .../v2024_03_01/aio/operations/_operations.py | 43 ++- .../v2024_03_01/models/_models_py3.py | 4 +- .../v2024_03_01/operations/_operations.py | 43 ++- .../resource/features/v2015_12_01/_version.py | 2 +- .../v2015_12_01/aio/operations/_operations.py | 19 +- .../v2015_12_01/operations/_operations.py | 19 +- .../resource/features/v2021_07_01/_version.py | 2 +- .../v2021_07_01/aio/operations/_operations.py | 29 +- .../v2021_07_01/operations/_operations.py | 29 +- .../resource/links/v2016_09_01/_version.py | 2 +- .../v2016_09_01/aio/operations/_operations.py | 19 +- .../v2016_09_01/operations/_operations.py | 19 +- .../resource/locks/v2015_01_01/_version.py | 2 +- .../v2015_01_01/aio/operations/_operations.py | 29 +- .../v2015_01_01/operations/_operations.py | 29 +- .../resource/locks/v2016_09_01/_version.py | 2 +- .../v2016_09_01/aio/operations/_operations.py | 83 +++-- .../v2016_09_01/operations/_operations.py | 83 +++-- .../v2019_07_01/_version.py | 2 +- .../v2019_07_01/aio/operations/_operations.py | 57 +-- .../v2019_07_01/operations/_operations.py | 57 +-- .../policy/v2015_10_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 33 +- .../operations/_operations.py | 33 +- .../resource/policy/v2016_04_01/_version.py | 2 +- .../v2016_04_01/aio/operations/_operations.py | 33 +- .../v2016_04_01/operations/_operations.py | 33 +- .../resource/policy/v2016_12_01/_version.py | 2 +- .../v2016_12_01/aio/operations/_operations.py | 45 ++- .../v2016_12_01/operations/_operations.py | 45 ++- .../policy/v2017_06_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 45 ++- .../operations/_operations.py | 45 ++- .../resource/policy/v2018_03_01/_version.py | 2 +- .../v2018_03_01/aio/operations/_operations.py | 65 ++-- .../v2018_03_01/operations/_operations.py | 65 ++-- .../resource/policy/v2018_05_01/_version.py | 2 +- .../v2018_05_01/aio/operations/_operations.py | 65 ++-- .../v2018_05_01/operations/_operations.py | 65 ++-- .../resource/policy/v2019_01_01/_version.py | 2 +- .../v2019_01_01/aio/operations/_operations.py | 65 ++-- .../v2019_01_01/operations/_operations.py | 65 ++-- .../resource/policy/v2019_06_01/_version.py | 2 +- .../v2019_06_01/aio/operations/_operations.py | 65 ++-- .../v2019_06_01/operations/_operations.py | 65 ++-- .../resource/policy/v2019_09_01/_version.py | 2 +- .../v2019_09_01/aio/operations/_operations.py | 67 ++-- .../v2019_09_01/operations/_operations.py | 67 ++-- .../policy/v2020_07_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 21 +- .../operations/_operations.py | 21 +- .../resource/policy/v2020_09_01/_version.py | 2 +- .../v2020_09_01/aio/operations/_operations.py | 71 ++-- .../v2020_09_01/operations/_operations.py | 71 ++-- .../resource/policy/v2021_06_01/_version.py | 2 +- .../v2021_06_01/aio/operations/_operations.py | 71 ++-- .../v2021_06_01/operations/_operations.py | 71 ++-- .../resource/policy/v2022_06_01/_version.py | 2 +- .../v2022_06_01/aio/operations/_operations.py | 31 +- .../v2022_06_01/operations/_operations.py | 31 +- .../policy/v2022_07_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 23 +- .../operations/_operations.py | 23 +- .../policy/v2022_08_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 39 +- .../operations/_operations.py | 39 +- .../resource/policy/v2023_04_01/_version.py | 2 +- .../v2023_04_01/aio/operations/_operations.py | 123 +++--- .../v2023_04_01/operations/_operations.py | 123 +++--- .../privatelinks/v2020_05_01/_version.py | 2 +- .../v2020_05_01/aio/operations/_operations.py | 25 +- .../v2020_05_01/operations/_operations.py | 25 +- .../resources/v2016_02_01/_version.py | 2 +- .../v2016_02_01/aio/operations/_operations.py | 80 ++-- .../v2016_02_01/operations/_operations.py | 80 ++-- .../resources/v2016_09_01/_version.py | 2 +- .../v2016_09_01/aio/operations/_operations.py | 90 ++--- .../v2016_09_01/operations/_operations.py | 90 ++--- .../resources/v2017_05_10/_version.py | 2 +- .../v2017_05_10/aio/operations/_operations.py | 92 ++--- .../v2017_05_10/operations/_operations.py | 92 ++--- .../resources/v2018_02_01/_version.py | 2 +- .../v2018_02_01/aio/operations/_operations.py | 88 ++--- .../v2018_02_01/operations/_operations.py | 88 ++--- .../resources/v2018_05_01/_version.py | 2 +- .../v2018_05_01/aio/operations/_operations.py | 114 +++--- .../v2018_05_01/operations/_operations.py | 114 +++--- .../resources/v2019_03_01/_version.py | 2 +- .../v2019_03_01/aio/operations/_operations.py | 114 +++--- .../v2019_03_01/operations/_operations.py | 114 +++--- .../resources/v2019_05_01/_version.py | 2 +- .../v2019_05_01/aio/operations/_operations.py | 134 +++---- .../v2019_05_01/operations/_operations.py | 134 +++---- .../resources/v2019_05_10/_version.py | 2 +- .../v2019_05_10/aio/operations/_operations.py | 138 +++---- .../v2019_05_10/operations/_operations.py | 138 +++---- .../resources/v2019_07_01/_version.py | 2 +- .../v2019_07_01/aio/operations/_operations.py | 182 ++++----- .../v2019_07_01/operations/_operations.py | 182 ++++----- .../resources/v2019_08_01/_version.py | 2 +- .../v2019_08_01/aio/operations/_operations.py | 182 ++++----- .../v2019_08_01/operations/_operations.py | 182 ++++----- .../resources/v2019_10_01/_version.py | 2 +- .../v2019_10_01/aio/operations/_operations.py | 194 +++++----- .../v2019_10_01/operations/_operations.py | 194 +++++----- .../resources/v2020_06_01/_version.py | 2 +- .../v2020_06_01/aio/operations/_operations.py | 196 +++++----- .../v2020_06_01/operations/_operations.py | 196 +++++----- .../resources/v2020_10_01/_version.py | 2 +- .../v2020_10_01/aio/operations/_operations.py | 198 +++++----- .../v2020_10_01/operations/_operations.py | 198 +++++----- .../resources/v2021_01_01/_version.py | 2 +- .../v2021_01_01/aio/operations/_operations.py | 198 +++++----- .../v2021_01_01/operations/_operations.py | 198 +++++----- .../resources/v2021_04_01/_version.py | 2 +- .../v2021_04_01/aio/operations/_operations.py | 229 ++++++------ .../v2021_04_01/operations/_operations.py | 229 ++++++------ .../resources/v2022_09_01/_version.py | 2 +- .../v2022_09_01/aio/operations/_operations.py | 327 ++++++++++------ .../v2022_09_01/operations/_operations.py | 350 ++++++++++++------ .../subscriptions/v2016_06_01/_version.py | 2 +- .../v2016_06_01/aio/operations/_operations.py | 21 +- .../v2016_06_01/operations/_operations.py | 21 +- .../subscriptions/v2018_06_01/_version.py | 2 +- .../v2018_06_01/aio/operations/_operations.py | 21 +- .../v2018_06_01/operations/_operations.py | 21 +- .../subscriptions/v2019_06_01/_version.py | 2 +- .../v2019_06_01/aio/operations/_operations.py | 21 +- .../v2019_06_01/operations/_operations.py | 21 +- .../subscriptions/v2019_11_01/_version.py | 2 +- .../v2019_11_01/aio/operations/_operations.py | 21 +- .../v2019_11_01/operations/_operations.py | 21 +- .../subscriptions/v2021_01_01/_version.py | 2 +- .../v2021_01_01/aio/operations/_operations.py | 19 +- .../v2021_01_01/operations/_operations.py | 19 +- .../subscriptions/v2022_12_01/_version.py | 2 +- .../v2022_12_01/aio/operations/_operations.py | 21 +- .../v2022_12_01/operations/_operations.py | 21 +- .../v2019_06_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 29 +- .../operations/_operations.py | 29 +- .../v2021_03_01_preview/_version.py | 2 +- .../aio/operations/_operations.py | 29 +- .../operations/_operations.py | 29 +- .../templatespecs/v2021_05_01/_version.py | 2 +- .../v2021_05_01/aio/operations/_operations.py | 29 +- .../v2021_05_01/operations/_operations.py | 29 +- .../templatespecs/v2022_02_01/_version.py | 2 +- .../v2022_02_01/aio/operations/_operations.py | 37 +- .../v2022_02_01/operations/_operations.py | 37 +- .../resources/get_tags_operation_results.py | 39 ++ 169 files changed, 4508 insertions(+), 3856 deletions(-) create mode 100644 sdk/resources/azure-mgmt-resource/generated_samples/resources/get_tags_operation_results.py diff --git a/sdk/resources/azure-mgmt-resource/_meta.json b/sdk/resources/azure-mgmt-resource/_meta.json index 3ae902c5f243..fe7cd6a17306 100644 --- a/sdk/resources/azure-mgmt-resource/_meta.json +++ b/sdk/resources/azure-mgmt-resource/_meta.json @@ -1,12 +1,12 @@ { - "commit": "3940cd77b8d74b58d4a8b3a80388ff890052be67", + "commit": "7a9a10771d120ce169debf736ca808bef2084562", "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.16", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/resources/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", + "autorest_command": "autorest specification/resources/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.16 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/resources/resource-manager/readme.md", "package-privatelinks-2020-05": "2022-03-18 16:14:07 -0700 2c68b6f0c9566d97d9d590a31b0d46997622eef7 Microsoft.Authorization/stable/2020-05-01/privateLinks.json", "package-features-2021-07": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Features/stable/2021-07-01/features.json", @@ -31,7 +31,7 @@ "package-policy-2016-12": "2019-06-12 19:24:50 -0400 c7a6b470d7bb65a240739e99a4d123ed1a3ca7e9 Microsoft.Authorization/stable/2016-12-01/policyAssignments.json", "package-policy-2016-04": "2018-12-10 12:22:37 -0500 3a0278ee2f92ca2fbb5c6bedf54607133bd4f8be Microsoft.Authorization/stable/2016-04-01/policy.json", "package-policy-2015-10": "2018-12-10 12:22:37 -0500 3a0278ee2f92ca2fbb5c6bedf54607133bd4f8be Microsoft.Authorization/preview/2015-10-01-preview/policy.json", - "package-resources-2022-09": "2023-06-14 18:50:13 -0700 49401294370eed6ed25de57fce89ac901c671cf4 Microsoft.Resources/stable/2022-09-01/resources.json", + "package-resources-2022-09": "2024-05-06 22:16:02 -0700 ece22cac3f6a40ee4ed2bf3ed3a092ac93bece90 Microsoft.Resources/stable/2022-09-01/resources.json", "package-resources-2021-04": "2022-08-21 21:31:53 -0700 81cd88a080c4bf4bb251afbe62892a6e220cb2b4 Microsoft.Resources/stable/2021-04-01/resources.json", "package-resources-2021-01": "2021-12-05 18:06:52 -0800 3b2f85d320fac5b282bc80240f9e5c2c57753bad Microsoft.Resources/stable/2021-01-01/resources.json", "package-resources-2020-10": "2023-08-31 10:22:11 +0530 215d86e8a195c08274acb9004be7adaa191f11ce Microsoft.Resources/stable/2020-10-01/resources.json", diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py index 7440e1bb5bba..8c9993ad586c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_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 @@ -30,6 +31,10 @@ from ..._vendor import _convert_request from ...operations._operations import build_changes_get_request, build_changes_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]] @@ -91,7 +96,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-05-01")) cls: ClsType[_models.ChangeResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,7 +191,7 @@ async def get( :rtype: ~azure.mgmt.resource.changes.v2022_05_01.models.ChangeResourceResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py index e60796562710..ee8d4f6349b5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_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]] @@ -178,7 +183,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-05-01")) cls: ClsType[_models.ChangeResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +278,7 @@ def get( :rtype: ~azure.mgmt.resource.changes.v2022_05_01.models.ChangeResourceResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py index 56468267fe06..da4dc0208e61 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_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, 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 @@ -42,6 +43,10 @@ build_deployment_scripts_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]] @@ -73,7 +78,7 @@ async def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +353,7 @@ async def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,7 +427,7 @@ async def get(self, resource_group_name: str, script_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -484,7 +489,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, @@ -543,7 +548,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme ) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -619,7 +624,7 @@ async def get_logs(self, resource_group_name: str, script_name: str, **kwargs: A :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLogsList :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_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +758,7 @@ def list_by_resource_group( ) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py index 5d22c10f3779..6014cadd1ed8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_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, 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]] @@ -330,7 +335,7 @@ def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -605,7 +610,7 @@ def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -679,7 +684,7 @@ def get(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -741,7 +746,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, @@ -800,7 +805,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentScr ) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +881,7 @@ def get_logs(self, resource_group_name: str, script_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLogsList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -941,7 +946,7 @@ def get_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1008,7 +1013,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py index e9d3afbb88c8..cf5dd86ab3a0 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_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 @@ -42,6 +43,10 @@ build_deployment_scripts_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]] @@ -73,7 +78,7 @@ async def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +349,7 @@ async def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ async def get(self, resource_group_name: str, script_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,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, @@ -531,7 +536,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +612,7 @@ async def get_logs(self, resource_group_name: str, script_name: str, **kwargs: A :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptLogsList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +675,7 @@ async def get_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +740,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py index aa05d7db2b30..80bebfe02743 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_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]] @@ -330,7 +335,7 @@ def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -601,7 +606,7 @@ def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -673,7 +678,7 @@ def get(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -733,7 +738,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, @@ -788,7 +793,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentScr api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -864,7 +869,7 @@ def get_logs(self, resource_group_name: str, script_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptLogsList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -927,7 +932,7 @@ def get_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -990,7 +995,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-10-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/aio/operations/_operations.py index 1237a9c513ee..2068066c043e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_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 @@ -42,6 +43,10 @@ build_deployment_scripts_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]] @@ -73,7 +78,7 @@ async def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +349,7 @@ async def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ async def get(self, resource_group_name: str, script_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +481,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, @@ -531,7 +536,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-08-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +612,7 @@ async def get_logs(self, resource_group_name: str, script_name: str, **kwargs: A :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.ScriptLogsList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +675,7 @@ async def get_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +740,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-08-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/operations/_operations.py index 91fcf0f928cb..607f16c619e7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_08_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2023_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]] @@ -330,7 +335,7 @@ def _create_initial( deployment_script: Union[_models.DeploymentScript, IO[bytes]], **kwargs: Any ) -> _models.DeploymentScript: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -601,7 +606,7 @@ def update( :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -673,7 +678,7 @@ def get(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.DeploymentScript :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -733,7 +738,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, @@ -788,7 +793,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentScr api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-08-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -864,7 +869,7 @@ def get_logs(self, resource_group_name: str, script_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.ScriptLogsList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -927,7 +932,7 @@ def get_logs_default( :rtype: ~azure.mgmt.resource.deploymentscripts.v2023_08_01.models.ScriptLog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -990,7 +995,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-08-01")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py index d2cca6786bf7..c35f28d05fed 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_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, 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 @@ -49,6 +50,10 @@ build_deployment_stacks_list_at_subscription_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]] @@ -95,7 +100,7 @@ def list_at_resource_group( ) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,7 +181,7 @@ def list_at_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme ) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +265,7 @@ def list_at_management_group( ) cls: ClsType[_models.DeploymentStackListResult] = 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_at_resource_group_initial( # pylint: disable=name-t deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,7 +547,7 @@ async def get_at_resource_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -596,7 +601,7 @@ async def _delete_at_resource_group_initial( # pylint: disable=inconsistent-ret unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -721,7 +726,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -911,7 +916,7 @@ async def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -963,7 +968,7 @@ async def _delete_at_subscription_initial( # pylint: disable=inconsistent-retur unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1091,7 @@ async def _create_or_update_at_management_group_initial( # pylint: disable=name deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1293,7 +1298,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1347,7 +1352,7 @@ async def _delete_at_management_group_initial( # pylint: disable=inconsistent-r unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1490,7 +1495,7 @@ async def export_template_at_resource_group( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1554,7 @@ async def export_template_at_subscription( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1609,7 +1614,7 @@ async def export_template_at_management_group( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py index 5ef8c07f9477..d4ada2977cf2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py @@ -79,7 +79,7 @@ class DenySettings(_serialization.Model): :ivar excluded_actions: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to - 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting + 'excludedActions': '*\\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. :vartype excluded_actions: list[str] @@ -118,7 +118,7 @@ def __init__( :keyword excluded_actions: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to - 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting + 'excludedActions': '*\\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. :paramtype excluded_actions: list[str] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py index e5af36e54fa4..8b8f020d2e5b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_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, 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]] @@ -686,7 +691,7 @@ def list_at_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +772,7 @@ def list_at_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentSta ) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +854,7 @@ def list_at_management_group(self, management_group_id: str, **kwargs: Any) -> I ) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -919,7 +924,7 @@ def _create_or_update_at_resource_group_initial( # pylint: disable=name-too-lon deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1130,7 +1135,7 @@ def get_at_resource_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,7 +1189,7 @@ def _delete_at_resource_group_initial( # pylint: disable=inconsistent-return-st unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1309,7 +1314,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1498,7 +1503,7 @@ def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1550,7 +1555,7 @@ def _delete_at_subscription_initial( # pylint: disable=inconsistent-return-stat unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1673,7 +1678,7 @@ def _create_or_update_at_management_group_initial( # pylint: disable=name-too-l deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1879,7 +1884,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1933,7 +1938,7 @@ def _delete_at_management_group_initial( # pylint: disable=inconsistent-return- unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2081,7 @@ def export_template_at_resource_group( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2135,7 +2140,7 @@ def export_template_at_subscription( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2195,7 +2200,7 @@ def export_template_at_management_group( ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/aio/operations/_operations.py index 116d60c3c53d..db939daef1e4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/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, 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 @@ -52,6 +53,10 @@ build_deployment_stacks_validate_stack_at_subscription_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]] @@ -96,7 +101,7 @@ def list_at_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,7 +180,7 @@ def list_at_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +262,7 @@ def list_at_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -327,7 +332,7 @@ async def _create_or_update_at_resource_group_initial( # pylint: disable=name-t deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +540,7 @@ async def get_at_resource_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,7 +594,7 @@ async def _delete_at_resource_group_initial( # pylint: disable=inconsistent-ret bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -723,7 +728,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,7 +914,7 @@ async def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -961,7 +966,7 @@ async def _delete_at_subscription_initial( # pylint: disable=inconsistent-retur bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,7 +1098,7 @@ async def _create_or_update_at_management_group_initial( # pylint: disable=name deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1296,7 +1301,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1349,7 +1354,7 @@ async def _delete_at_management_group_initial( # pylint: disable=inconsistent-r bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1499,7 @@ async def export_template_at_resource_group( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1551,7 +1556,7 @@ async def export_template_at_subscription( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1609,7 +1614,7 @@ async def export_template_at_management_group( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1664,7 @@ async def _validate_stack_at_resource_group_initial( # pylint: disable=name-too deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1863,7 +1868,7 @@ def get_long_running_output(pipeline_response): async def _validate_stack_at_subscription_initial( self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ async def _validate_stack_at_management_group_initial( # pylint: disable=name-t deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/models/_models_py3.py index 03c5a6912258..452ab297c68a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/models/_models_py3.py @@ -141,7 +141,7 @@ class DenySettings(_serialization.Model): :ivar excluded_actions: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to - 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting + 'excludedActions': '*\\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. :vartype excluded_actions: list[str] @@ -181,7 +181,7 @@ def __init__( :keyword excluded_actions: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to - 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting + 'excludedActions': '*\\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. :paramtype excluded_actions: list[str] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/operations/_operations.py index a3db2a45733a..fa817d8134ec 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2024_03_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/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, 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]] @@ -834,7 +839,7 @@ def list_at_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.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,7 +918,7 @@ def list_at_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentSta api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -993,7 +998,7 @@ def list_at_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1068,7 @@ def _create_or_update_at_resource_group_initial( # pylint: disable=name-too-lon deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1270,7 +1275,7 @@ def get_at_resource_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1324,7 +1329,7 @@ def _delete_at_resource_group_initial( # pylint: disable=inconsistent-return-st bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - 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): # pylint: disable=inconsistent- def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1643,7 +1648,7 @@ def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1700,7 @@ def _delete_at_subscription_initial( # pylint: disable=inconsistent-return-stat bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1827,7 +1832,7 @@ def _create_or_update_at_management_group_initial( # pylint: disable=name-too-l deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> _models.DeploymentStack: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2029,7 +2034,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2082,7 +2087,7 @@ def _delete_at_management_group_initial( # pylint: disable=inconsistent-return- bypass_stack_out_of_sync_error: Optional[bool] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2227,7 +2232,7 @@ def export_template_at_resource_group( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2284,7 +2289,7 @@ def export_template_at_subscription( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2342,7 +2347,7 @@ def export_template_at_management_group( ~azure.mgmt.resource.deploymentstacks.v2024_03_01.models.DeploymentStackTemplateDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2392,7 +2397,7 @@ def _validate_stack_at_resource_group_initial( # pylint: disable=name-too-long deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2596,7 +2601,7 @@ def get_long_running_output(pipeline_response): def _validate_stack_at_subscription_initial( self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2787,7 +2792,7 @@ def _validate_stack_at_management_group_initial( # pylint: disable=name-too-lon deployment_stack: Union[_models.DeploymentStack, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentStackValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py index 19029cf9f6ef..dd8587bc1399 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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 @@ -38,6 +39,10 @@ ) from .._vendor import FeatureClientMixinABC +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]] @@ -66,7 +71,7 @@ def list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +168,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.FeatureResult"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -244,7 +249,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> AsyncIterable api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +324,7 @@ async def get(self, resource_provider_namespace: str, feature_name: str, **kwarg :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +381,7 @@ async def register( :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -433,7 +438,7 @@ async def unregister( :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py index 744afa8b8f71..cc6813ca1a87 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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 FeatureClientMixinABC, _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]] @@ -224,7 +229,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +326,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.FeatureResult"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +407,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> Iterable["_mo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +482,7 @@ def get(self, resource_provider_namespace: str, feature_name: str, **kwargs: Any :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,7 +537,7 @@ def register(self, resource_provider_namespace: str, feature_name: str, **kwargs :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +592,7 @@ def unregister(self, resource_provider_namespace: str, feature_name: str, **kwar :rtype: ~azure.mgmt.resource.features.v2015_12_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py index ed235b6bfff9..872e2948d1fd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -44,6 +45,10 @@ ) from .._vendor import FeatureClientMixinABC +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]] @@ -72,7 +77,7 @@ def list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +175,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.FeatureResult"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -252,7 +257,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> AsyncIterable api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +333,7 @@ async def get(self, resource_provider_namespace: str, feature_name: str, **kwarg :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -386,7 +391,7 @@ async def register( :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -444,7 +449,7 @@ async def unregister( :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,7 +528,7 @@ async def get( :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.SubscriptionFeatureRegistration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +651,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.SubscriptionFeatureRegistration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,7 +724,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, @@ -779,7 +784,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.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +864,7 @@ def list_all_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Subs api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py index 2024ddb9c08c..1ace14bc1436 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import FeatureClientMixinABC, _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]] @@ -379,7 +384,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +482,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.FeatureResult"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -559,7 +564,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> Iterable["_mo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +640,7 @@ def get(self, resource_provider_namespace: str, feature_name: str, **kwargs: Any :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +696,7 @@ def register(self, resource_provider_namespace: str, feature_name: str, **kwargs :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -747,7 +752,7 @@ def unregister(self, resource_provider_namespace: str, feature_name: str, **kwar :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.FeatureResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -824,7 +829,7 @@ def get(self, provider_namespace: str, feature_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.SubscriptionFeatureRegistration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -947,7 +952,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.features.v2021_07_01.models.SubscriptionFeatureRegistration :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1020,7 +1025,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, @@ -1080,7 +1085,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.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1160,7 +1165,7 @@ def list_all_by_subscription(self, **kwargs: Any) -> Iterable["_models.Subscript api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py index bcb691f0eb4f..d3c18ec21b55 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_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, Literal, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,6 +39,10 @@ build_resource_links_list_at_subscription_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 list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +178,7 @@ async def delete(self, link_id: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :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 create_or_update( :rtype: ~azure.mgmt.resource.links.v2016_09_01.models.ResourceLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +347,7 @@ async def get(self, link_id: str, **kwargs: Any) -> _models.ResourceLink: :rtype: ~azure.mgmt.resource.links.v2016_09_01.models.ResourceLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def list_at_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -492,7 +497,7 @@ def list_at_source_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py index 1542b0b05865..b74c69a34775 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_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, Literal, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Literal, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -217,7 +222,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +318,7 @@ def delete(self, link_id: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,7 +418,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.links.v2016_09_01.models.ResourceLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +487,7 @@ def get(self, link_id: str, **kwargs: Any) -> _models.ResourceLink: :rtype: ~azure.mgmt.resource.links.v2016_09_01.models.ResourceLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,7 +547,7 @@ def list_at_subscription(self, filter: Optional[str] = None, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +635,7 @@ def list_at_source_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceLinkResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py index 306f25838d84..62352a51d0fd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,6 +44,10 @@ build_management_locks_list_at_subscription_level_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]] @@ -141,7 +146,7 @@ async def create_or_update_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -214,7 +219,7 @@ async def delete_at_resource_group_level( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +272,7 @@ async def get_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,7 +425,7 @@ async def create_or_update_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -512,7 +517,7 @@ async def delete_at_resource_level( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -612,7 +617,7 @@ async def create_or_update_at_subscription_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -682,7 +687,7 @@ async def delete_at_subscription_level( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +735,7 @@ async def get(self, lock_name: str, **kwargs: Any) -> _models.ManagementLockObje :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -794,7 +799,7 @@ def list_at_resource_group_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -896,7 +901,7 @@ def list_at_resource_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -984,7 +989,7 @@ def list_at_subscription_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py index d4492b898fb1..6b96ed3f2ec3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -502,7 +507,7 @@ def create_or_update_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +580,7 @@ def delete_at_resource_group_level( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -628,7 +633,7 @@ def get_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -781,7 +786,7 @@ def create_or_update_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +878,7 @@ def delete_at_resource_level( # 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, @@ -973,7 +978,7 @@ def create_or_update_at_subscription_level( :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,7 +1048,7 @@ def delete_at_subscription_level( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1091,7 +1096,7 @@ def get(self, lock_name: str, **kwargs: Any) -> _models.ManagementLockObject: :rtype: ~azure.mgmt.resource.locks.v2015_01_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,7 +1160,7 @@ def list_at_resource_group_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1257,7 +1262,7 @@ def list_at_resource_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1350,7 @@ def list_at_subscription_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py index 74691810026b..3da1f350c904 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -49,6 +50,10 @@ build_management_locks_list_by_scope_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 list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,14 +188,14 @@ async def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -215,14 +220,14 @@ async def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: IO[bytes] @@ -245,14 +250,14 @@ async def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -262,7 +267,7 @@ async def create_or_update_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -327,7 +332,7 @@ async def delete_at_resource_group_level( # pylint: disable=inconsistent-return ) -> None: """Deletes a management lock at the resource group level. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -339,7 +344,7 @@ async def delete_at_resource_group_level( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -392,7 +397,7 @@ async def get_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +522,7 @@ async def create_or_update_by_scope( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,7 +594,7 @@ async def delete_by_scope( # 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, @@ -639,7 +644,7 @@ async def get_by_scope(self, scope: str, lock_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -698,7 +703,7 @@ async def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -715,7 +720,7 @@ async def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -744,7 +749,7 @@ async def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -761,7 +766,7 @@ async def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Required. :type parameters: IO[bytes] @@ -788,7 +793,7 @@ async def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -805,7 +810,7 @@ async def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -815,7 +820,7 @@ async def create_or_update_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -891,7 +896,7 @@ async def delete_at_resource_level( # pylint: disable=inconsistent-return-state ) -> None: """Deletes the management lock of a resource or any level below the resource. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -913,7 +918,7 @@ async def delete_at_resource_level( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -986,7 +991,7 @@ async def get_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1045,12 +1050,12 @@ async def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -1069,12 +1074,12 @@ async def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: IO[bytes] @@ -1093,12 +1098,12 @@ async def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -1108,7 +1113,7 @@ async def create_or_update_at_subscription_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1172,7 +1177,7 @@ async def delete_at_subscription_level( # pylint: disable=inconsistent-return-s ) -> None: """Deletes the management lock at the subscription level. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1182,7 +1187,7 @@ async def delete_at_subscription_level( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1230,7 +1235,7 @@ async def get_at_subscription_level(self, lock_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1295,7 +1300,7 @@ def list_at_resource_group_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1402,7 @@ def list_at_resource_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1490,7 @@ def list_at_subscription_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1574,7 +1579,7 @@ def list_by_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py index 007ad0da53b8..02514dcdb760 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -613,7 +618,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,14 +713,14 @@ def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -740,14 +745,14 @@ def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: IO[bytes] @@ -770,14 +775,14 @@ def create_or_update_at_resource_group_level( """Creates or updates a management lock at the resource group level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param resource_group_name: The name of the resource group to lock. Required. :type resource_group_name: str :param lock_name: The lock name. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -787,7 +792,7 @@ def create_or_update_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +857,7 @@ def delete_at_resource_group_level( # pylint: disable=inconsistent-return-state ) -> None: """Deletes a management lock at the resource group level. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -864,7 +869,7 @@ def delete_at_resource_group_level( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +922,7 @@ def get_at_resource_group_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,7 +1047,7 @@ def create_or_update_by_scope( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1114,7 +1119,7 @@ def delete_by_scope( # 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, @@ -1164,7 +1169,7 @@ def get_by_scope(self, scope: str, lock_name: str, **kwargs: Any) -> _models.Man :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1223,7 +1228,7 @@ def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1240,7 +1245,7 @@ def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -1269,7 +1274,7 @@ def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1286,7 +1291,7 @@ def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Required. :type parameters: IO[bytes] @@ -1313,7 +1318,7 @@ def create_or_update_at_resource_level( """Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1330,7 +1335,7 @@ def create_or_update_at_resource_level( :param resource_name: The name of the resource to lock. Required. :type resource_name: str :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: Parameters for creating or updating a management lock. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -1340,7 +1345,7 @@ def create_or_update_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1421,7 @@ def delete_at_resource_level( # pylint: disable=inconsistent-return-statements ) -> None: """Deletes the management lock of a resource or any level below the resource. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1438,7 +1443,7 @@ def delete_at_resource_level( # 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, @@ -1511,7 +1516,7 @@ def get_at_resource_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1570,12 +1575,12 @@ def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject @@ -1594,12 +1599,12 @@ def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Required. :type parameters: IO[bytes] @@ -1618,12 +1623,12 @@ def create_or_update_at_subscription_level( """Creates or updates a management lock at the subscription level. When you apply a lock at a parent scope, all child resources inherit the same lock. To create - management locks, you must have access to Microsoft.Authorization/\ * or + management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. :param lock_name: The name of lock. The lock name can be a maximum of 260 characters. It cannot - contain <, > %, &, :, \, ?, /, or any control characters. Required. + contain <, > %, &, :, \\, ?, /, or any control characters. Required. :type lock_name: str :param parameters: The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required. @@ -1633,7 +1638,7 @@ def create_or_update_at_subscription_level( :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1697,7 +1702,7 @@ def delete_at_subscription_level( # pylint: disable=inconsistent-return-stateme ) -> None: """Deletes the management lock at the subscription level. - To delete management locks, you must have access to Microsoft.Authorization/\ * or + To delete management locks, you must have access to Microsoft.Authorization/\\ * or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @@ -1707,7 +1712,7 @@ def delete_at_subscription_level( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1760,7 @@ def get_at_subscription_level(self, lock_name: str, **kwargs: Any) -> _models.Ma :rtype: ~azure.mgmt.resource.locks.v2016_09_01.models.ManagementLockObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1820,7 +1825,7 @@ def list_at_resource_group_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1922,7 +1927,7 @@ def list_at_resource_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2010,7 +2015,7 @@ def list_at_subscription_level( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2099,7 +2104,7 @@ def list_by_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py index e963692cf72a..bdb5b5353667 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/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, 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 @@ -60,6 +61,10 @@ ) from .._vendor import ApplicationClientMixinABC +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 list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +188,7 @@ async def get(self, resource_group_name: str, application_name: str, **kwargs: A :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -230,7 +235,7 @@ async def get(self, resource_group_name: str, application_name: str, **kwargs: A async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -331,7 +336,7 @@ async def _create_or_update_initial( parameters: Union[_models.Application, IO[bytes]], **kwargs: Any ) -> _models.Application: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -603,7 +608,7 @@ async def update( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -682,7 +687,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.ApplicationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,7 +766,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Applicat api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -837,7 +842,7 @@ async def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Applica :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,7 +887,7 @@ async def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Applica async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, application_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -974,7 +979,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, application_id: str, parameters: Union[_models.Application, IO[bytes]], **kwargs: Any ) -> _models.Application: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1225,7 +1230,7 @@ async def update_by_id( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1285,7 +1290,7 @@ async def update_by_id( async def _refresh_permissions_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1415,7 +1420,7 @@ async def get( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.ApplicationDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1467,7 @@ async def get( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_definition_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1564,7 +1569,7 @@ async def _create_or_update_initial( parameters: Union[_models.ApplicationDefinition, IO[bytes]], **kwargs: Any ) -> _models.ApplicationDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1777,7 +1782,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.ApplicationDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1856,7 +1861,7 @@ async def get_by_id( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.ApplicationDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1903,7 +1908,7 @@ async def get_by_id( async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_definition_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2004,7 +2009,7 @@ async def _create_or_update_by_id_initial( parameters: Union[_models.ApplicationDefinition, IO[bytes]], **kwargs: Any ) -> _models.ApplicationDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2230,7 +2235,7 @@ async def get(self, resource_group_name: str, jit_request_name: str, **kwargs: A :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2286,7 @@ async def _create_or_update_initial( parameters: Union[_models.JitRequestDefinition, IO[bytes]], **kwargs: Any ) -> _models.JitRequestDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2549,7 +2554,7 @@ async def update( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2620,7 +2625,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, @@ -2669,7 +2674,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.JitRequestDefinit ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinitionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2725,7 +2730,7 @@ async def list_by_resource_group( ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinitionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py index 0f4eecc43eb2..ea865349e4d7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/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, 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 ApplicationClientMixinABC, _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]] @@ -859,7 +864,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -954,7 +959,7 @@ def get(self, resource_group_name: str, application_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1001,7 +1006,7 @@ def get(self, resource_group_name: str, application_name: str, **kwargs: Any) -> def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1100,7 +1105,7 @@ def _create_or_update_initial( parameters: Union[_models.Application, IO[bytes]], **kwargs: Any ) -> _models.Application: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1372,7 +1377,7 @@ def update( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1451,7 +1456,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.ApplicationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1530,7 +1535,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Application"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1606,7 +1611,7 @@ def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Application: :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1651,7 +1656,7 @@ def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Application: def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, application_id: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1748,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, application_id: str, parameters: Union[_models.Application, IO[bytes]], **kwargs: Any ) -> _models.Application: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1994,7 +1999,7 @@ def update_by_id( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.Application :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2054,7 +2059,7 @@ def update_by_id( def _refresh_permissions_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2184,7 +2189,7 @@ def get( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.ApplicationDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2231,7 +2236,7 @@ def get( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_definition_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2333,7 +2338,7 @@ def _create_or_update_initial( parameters: Union[_models.ApplicationDefinition, IO[bytes]], **kwargs: Any ) -> _models.ApplicationDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2551,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.ApplicationDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2625,7 +2630,7 @@ def get_by_id( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.ApplicationDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2672,7 +2677,7 @@ def get_by_id( def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, application_definition_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2773,7 +2778,7 @@ def _create_or_update_by_id_initial( parameters: Union[_models.ApplicationDefinition, IO[bytes]], **kwargs: Any ) -> _models.ApplicationDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2999,7 +3004,7 @@ def get(self, resource_group_name: str, jit_request_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3050,7 +3055,7 @@ def _create_or_update_initial( parameters: Union[_models.JitRequestDefinition, IO[bytes]], **kwargs: Any ) -> _models.JitRequestDefinition: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3318,7 +3323,7 @@ def update( :rtype: ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3389,7 +3394,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, @@ -3438,7 +3443,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.JitRequestDefinitionLis ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinitionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3492,7 +3497,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mo ~azure.mgmt.resource.managedapplications.v2019_07_01.models.JitRequestDefinitionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py index bb80a7652b0e..86e7a75e3926 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -45,6 +46,10 @@ build_policy_definitions_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]] @@ -81,7 +86,7 @@ async def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,7 +213,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,7 +281,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +349,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +452,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -534,7 +539,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +620,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -745,7 +750,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -818,7 +823,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -944,7 +949,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +1017,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, @@ -1062,7 +1067,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1125,7 +1130,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m ) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py index 33eaa25aa193..5590888aa82f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -461,7 +466,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +593,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -656,7 +661,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +729,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -827,7 +832,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,7 +919,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +1000,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1125,7 +1130,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1198,7 +1203,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1324,7 +1329,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,7 +1397,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, @@ -1442,7 +1447,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1505,7 +1510,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models ) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py index 0807b6cd1244..e88eb89089bc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -45,6 +46,10 @@ build_policy_definitions_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]] @@ -81,7 +86,7 @@ async def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,7 +210,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,7 +276,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +340,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -436,7 +441,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -521,7 +526,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,7 +607,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,7 +734,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -800,7 +805,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -923,7 +928,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -989,7 +994,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, @@ -1037,7 +1042,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1096,7 +1101,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py index 871b4362488e..fbeca96c47bc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -461,7 +466,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,7 +590,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +656,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -715,7 +720,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +821,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -901,7 +906,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -982,7 +987,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1109,7 +1114,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1180,7 +1185,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,7 +1308,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1369,7 +1374,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, @@ -1417,7 +1422,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1476,7 +1481,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py index 0f816ec2340b..4ca3145852f6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -51,6 +52,10 @@ build_policy_definitions_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]] @@ -136,7 +141,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +207,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, @@ -250,7 +255,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +307,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +421,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -484,7 +489,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +541,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -593,7 +598,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +675,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,7 +755,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -847,7 +852,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -973,7 +978,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1044,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1103,7 +1108,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1204,7 +1209,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1289,7 +1294,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1370,7 +1375,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1497,7 +1502,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1568,7 +1573,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py index 86b2f2e7b61e..98cf8d7bd5a4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -667,7 +672,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -733,7 +738,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, @@ -781,7 +786,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +838,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -947,7 +952,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1015,7 +1020,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1067,7 +1072,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1124,7 +1129,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1201,7 +1206,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1279,7 +1284,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1374,7 +1379,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1505,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1566,7 +1571,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1630,7 +1635,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1731,7 +1736,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1816,7 +1821,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1897,7 +1902,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2029,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2095,7 +2100,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py index 073e729bc8db..a1e26312a468 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -51,6 +52,10 @@ build_policy_set_definitions_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]] @@ -89,7 +94,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +224,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +293,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -357,7 +362,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -461,7 +466,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -549,7 +554,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +636,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -762,7 +767,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -836,7 +841,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -963,7 +968,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1041,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, @@ -1087,7 +1092,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1142,7 +1147,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1203,7 +1208,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1283,7 +1288,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1499,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1554,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1615,7 +1620,7 @@ def list_by_management_group( ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py index 55357c0ad910..2041fbf279cd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -634,7 +639,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -764,7 +769,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +838,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -902,7 +907,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1006,7 +1011,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1094,7 +1099,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models ) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1176,7 +1181,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1307,7 +1312,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1381,7 +1386,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1508,7 +1513,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1581,7 +1586,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, @@ -1632,7 +1637,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1687,7 +1692,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1748,7 +1753,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1828,7 +1833,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1964,7 +1969,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2039,7 +2044,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2099,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2017_06_01_preview.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2160,7 +2165,7 @@ def list_by_management_group( ) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py index 196624a17661..c02e0e2031a9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -61,6 +62,10 @@ build_policy_set_definitions_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]] @@ -108,7 +113,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment or None :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 create( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +333,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,7 +411,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +541,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +640,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +859,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +933,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1066,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1134,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, @@ -1179,7 +1184,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1238,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1361,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1431,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1545,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1624,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1706,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1933,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, @@ -1980,7 +1985,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +2040,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2099,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2174,7 +2179,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2324,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,7 +2400,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2451,7 +2456,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2521,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py index 5d3a41c0ec3e..96934b44665a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -917,7 +922,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1062,7 +1067,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1142,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1215,7 +1220,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1350,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1444,7 +1449,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1663,7 +1668,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1737,7 +1742,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1875,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1943,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, @@ -1988,7 +1993,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2235,7 +2240,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2349,7 +2354,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2428,7 +2433,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2508,7 +2513,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2662,7 +2667,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2740,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, @@ -2787,7 +2792,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2842,7 +2847,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2901,7 +2906,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3126,7 +3131,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3207,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_03_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3328,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-03-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py index 9dbef401a516..1c5f949d8bae 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -61,6 +62,10 @@ build_policy_set_definitions_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]] @@ -108,7 +113,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment or None :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 create( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +333,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,7 +411,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +541,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +640,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +859,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +933,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1066,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1134,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, @@ -1179,7 +1184,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1238,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1361,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1431,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1545,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1624,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1706,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1933,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, @@ -1980,7 +1985,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +2040,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2099,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2174,7 +2179,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2324,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,7 +2400,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2451,7 +2456,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2521,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py index f079fc53780b..edbdd2814e6e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -917,7 +922,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1062,7 +1067,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1142,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1215,7 +1220,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1350,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1444,7 +1449,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1663,7 +1668,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1737,7 +1742,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1875,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1943,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, @@ -1988,7 +1993,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2235,7 +2240,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2349,7 +2354,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2428,7 +2433,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2508,7 +2513,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2662,7 +2667,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2740,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, @@ -2787,7 +2792,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2842,7 +2847,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2901,7 +2906,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3126,7 +3131,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3207,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2018_05_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3328,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py index 03e3937daec3..e060833eefb8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -61,6 +62,10 @@ build_policy_set_definitions_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]] @@ -108,7 +113,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment or None :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 create( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +333,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,7 +411,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +541,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +640,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +859,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +933,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1066,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1134,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, @@ -1179,7 +1184,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1238,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1361,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1431,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1545,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1624,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1706,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1933,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, @@ -1980,7 +1985,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +2040,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2099,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2174,7 +2179,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2324,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,7 +2400,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2451,7 +2456,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2521,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py index 0410bea1fe9a..396a80cda598 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -917,7 +922,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1062,7 +1067,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1142,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1215,7 +1220,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1350,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1444,7 +1449,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1663,7 +1668,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1737,7 +1742,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1875,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1943,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, @@ -1988,7 +1993,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2235,7 +2240,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2349,7 +2354,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2428,7 +2433,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2508,7 +2513,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2662,7 +2667,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2740,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, @@ -2787,7 +2792,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2842,7 +2847,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2901,7 +2906,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3126,7 +3131,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3207,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_01_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3328,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py index a529254a694c..9238327e892c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -61,6 +62,10 @@ build_policy_set_definitions_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]] @@ -108,7 +113,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment or None :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 create( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +333,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,7 +411,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +541,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +640,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +859,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +933,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1066,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1134,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, @@ -1179,7 +1184,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1238,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1361,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1431,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1545,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1624,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1706,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1860,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1933,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, @@ -1980,7 +1985,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +2040,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2099,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2174,7 +2179,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2324,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,7 +2400,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2451,7 +2456,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2521,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py index 0563e401eec7..2e6d390a2d94 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -917,7 +922,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1062,7 +1067,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1142,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1215,7 +1220,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1350,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1444,7 +1449,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1532,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1663,7 +1668,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1737,7 +1742,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1875,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1943,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, @@ -1988,7 +1993,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2047,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2170,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2235,7 +2240,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2349,7 +2354,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2428,7 +2433,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2508,7 +2513,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2662,7 +2667,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2740,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, @@ -2787,7 +2792,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2842,7 +2847,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2901,7 +2906,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2986,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3126,7 +3131,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3207,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3263,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3328,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py index aa5959e89a64..f26920efd66a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -62,6 +63,10 @@ build_policy_set_definitions_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]] @@ -109,7 +114,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment or None :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 create( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -327,7 +332,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +538,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +636,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +729,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,7 +811,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -941,7 +946,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1019,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1146,7 +1151,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1214,7 +1219,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, @@ -1264,7 +1269,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1318,7 +1323,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1441,7 +1446,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :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 delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1566,7 +1571,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1625,7 +1630,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1704,7 +1709,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1786,7 +1791,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1940,7 +1945,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2012,7 +2017,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, @@ -2063,7 +2068,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2117,7 +2122,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2175,7 +2180,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2254,7 +2259,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2398,7 +2403,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2473,7 +2478,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2528,7 +2533,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2592,7 +2597,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py index f4f8c87a5885..e93cc919a00e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -959,7 +964,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1103,7 +1108,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1177,7 +1182,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1254,7 +1259,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1383,7 +1388,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1486,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = 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, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1661,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1791,7 +1796,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1864,7 +1869,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1996,7 +2001,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2064,7 +2069,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, @@ -2114,7 +2119,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2168,7 +2173,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2291,7 +2296,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2361,7 +2366,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2416,7 +2421,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2475,7 +2480,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2554,7 +2559,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2634,7 +2639,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2793,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2860,7 +2865,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, @@ -2911,7 +2916,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2970,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3023,7 +3028,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3102,7 +3107,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3246,7 +3251,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,7 +3326,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3376,7 +3381,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2019_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3440,7 +3445,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/aio/operations/_operations.py index 7fb5e6eb2ec6..d5b3482732c3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -39,6 +40,10 @@ build_policy_exemptions_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]] @@ -86,7 +91,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, @@ -230,7 +235,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_07_01_preview.models.PolicyExemption :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, scope: str, policy_exemption_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.resource.policy.v2020_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,7 +396,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -495,7 +500,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +636,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -739,7 +744,7 @@ def list_for_management_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/operations/_operations.py index ffc84256c75e..bed9261ff81c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_07_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -307,7 +312,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, @@ -451,7 +456,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -531,7 +536,7 @@ def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _models. :rtype: ~azure.mgmt.resource.policy.v2020_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -612,7 +617,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -716,7 +721,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +857,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -960,7 +965,7 @@ def list_for_management_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py index 4c26de464218..3e025ae84df4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -64,6 +65,10 @@ build_policy_set_definitions_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]] @@ -100,7 +105,7 @@ async def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.D :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.DataPolicyManifest :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,7 +172,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +278,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +422,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -491,7 +496,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +723,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -827,7 +832,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -932,7 +937,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1015,7 +1020,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment or None :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 create_by_id( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :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_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1355,7 +1360,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1428,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, @@ -1473,7 +1478,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :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_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1650,7 +1655,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1720,7 +1725,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :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 get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1857,7 +1862,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1956,7 +1961,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2062,7 +2067,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2218,7 +2223,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2295,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, @@ -2341,7 +2346,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,7 +2400,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2481,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2573,7 +2578,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2719,7 +2724,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2794,7 +2799,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2849,7 +2854,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2934,7 +2939,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py index 6fccb89ebad4..e3f77caaedfd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -1042,7 +1047,7 @@ def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.DataPol :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.DataPolicyManifest :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1109,7 +1114,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1213,7 +1218,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1357,7 +1362,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1431,7 +1436,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1518,7 +1523,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1658,7 +1663,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1767,7 +1772,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1872,7 +1877,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1955,7 +1960,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2090,7 +2095,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2163,7 +2168,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2300,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2363,7 +2368,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, @@ -2413,7 +2418,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2467,7 +2472,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2590,7 +2595,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2665,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2715,7 +2720,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2797,7 +2802,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2896,7 +2901,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3002,7 +3007,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3158,7 +3163,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3230,7 +3235,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, @@ -3281,7 +3286,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3335,7 +3340,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3416,7 +3421,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3513,7 +3518,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3659,7 +3664,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3734,7 +3739,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3789,7 +3794,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2020_09_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3874,7 +3879,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py index 5311784eead4..cb3e70f2acdd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -64,6 +65,10 @@ build_policy_set_definitions_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]] @@ -111,7 +116,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -255,7 +260,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -329,7 +334,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :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.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -571,7 +576,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -711,7 +716,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -820,7 +825,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -925,7 +930,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1008,7 +1013,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment or None :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 create_by_id( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1216,7 +1221,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1355,7 @@ async def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1499,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1562,7 +1567,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, @@ -1612,7 +1617,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1666,7 +1671,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1789,7 +1794,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1859,7 +1864,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1914,7 +1919,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1996,7 +2001,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2095,7 +2100,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2201,7 +2206,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2357,7 +2362,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2429,7 +2434,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, @@ -2480,7 +2485,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2534,7 +2539,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2615,7 +2620,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2712,7 +2717,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2858,7 +2863,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2933,7 +2938,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2993,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3073,7 +3078,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py index 5733b81348ac..2f466ad6ce01 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -1063,7 +1068,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1207,7 +1212,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1281,7 +1286,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1424,7 +1429,7 @@ def update( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1523,7 +1528,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1663,7 +1668,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1772,7 +1777,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1877,7 +1882,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1960,7 +1965,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2095,7 +2100,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2168,7 +2173,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2302,7 +2307,7 @@ def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,7 +2451,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2514,7 +2519,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, @@ -2564,7 +2569,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2618,7 +2623,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2741,7 +2746,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2811,7 +2816,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2866,7 +2871,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2948,7 +2953,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3047,7 +3052,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3153,7 +3158,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3309,7 +3314,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3381,7 +3386,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, @@ -3432,7 +3437,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3486,7 +3491,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3567,7 +3572,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3664,7 +3669,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3810,7 +3815,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3885,7 +3890,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3940,7 +3945,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2021_06_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4025,7 +4030,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py index 73b4c639ea3e..2b7590656d04 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -44,6 +45,10 @@ build_policy_assignments_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 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -235,7 +240,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +314,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -452,7 +457,7 @@ async def update( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +556,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +696,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -800,7 +805,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -905,7 +910,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -988,7 +993,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1123,7 +1128,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1196,7 +1201,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1330,7 +1335,7 @@ async def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py index 61bc8e0b5095..1d8427e4b885 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -457,7 +462,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -601,7 +606,7 @@ def create( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -675,7 +680,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -818,7 +823,7 @@ def update( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +922,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1057,7 +1062,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1171,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1271,7 +1276,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1359,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1494,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1562,7 +1567,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1696,7 +1701,7 @@ def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2022_06_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/aio/operations/_operations.py index db2a385c08ac..d2083bb972ea 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ build_policy_exemptions_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]] @@ -87,7 +92,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, @@ -231,7 +236,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -311,7 +316,7 @@ async def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +455,7 @@ async def update( :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +548,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +652,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -783,7 +788,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -891,7 +896,7 @@ def list_for_management_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/operations/_operations.py index 938d40de33b0..4c0b56f31e33 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_07_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -337,7 +342,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, @@ -481,7 +486,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -561,7 +566,7 @@ def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _models. :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -700,7 +705,7 @@ def update( :rtype: ~azure.mgmt.resource.policy.v2022_07_01_preview.models.PolicyExemption :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +798,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -897,7 +902,7 @@ def list_for_resource_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1033,7 +1038,7 @@ def list_for_resource( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1146,7 @@ def list_for_management_group( ) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/aio/operations/_operations.py index 1d193bab3dd9..5df0d2d170c7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -48,6 +49,10 @@ build_variables_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]] @@ -86,7 +91,7 @@ async def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,7 +191,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,7 +264,7 @@ async def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +326,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,7 +448,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,7 +525,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +588,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Variable"]: ) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -666,7 +671,7 @@ def list_for_management_group(self, management_group_id: str, **kwargs: Any) -> ) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +772,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, @@ -891,7 +896,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -967,7 +972,7 @@ async def get(self, variable_name: str, variable_value_name: str, **kwargs: Any) :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,7 +1039,7 @@ def list(self, variable_name: str, **kwargs: Any) -> AsyncIterable["_models.Vari ) cls: ClsType[_models.VariableValueListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1123,7 +1128,7 @@ def list_for_management_group( ) cls: ClsType[_models.VariableValueListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1206,7 +1211,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1339,7 +1344,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1424,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/operations/_operations.py index d5749d769a82..4ff065f5272d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_08_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -551,7 +556,7 @@ def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +656,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +729,7 @@ def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -786,7 +791,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +913,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -983,7 +988,7 @@ def get_at_management_group(self, management_group_id: str, variable_name: str, :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.Variable :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1046,7 +1051,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Variable"]: ) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1134,7 @@ def list_for_management_group(self, management_group_id: str, **kwargs: Any) -> ) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1230,7 +1235,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, @@ -1354,7 +1359,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1430,7 +1435,7 @@ def get(self, variable_name: str, variable_value_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1497,7 +1502,7 @@ def list(self, variable_name: str, **kwargs: Any) -> Iterable["_models.VariableV ) cls: ClsType[_models.VariableValueListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1586,7 +1591,7 @@ def list_for_management_group( ) cls: ClsType[_models.VariableValueListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1674,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1807,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1882,7 +1887,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2022_08_01_preview.models.VariableValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/aio/operations/_operations.py index c1399db16031..e5e9769ac118 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -90,6 +91,10 @@ build_policy_set_definitions_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]] @@ -184,7 +189,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -252,7 +257,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, @@ -302,7 +307,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +361,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -479,7 +484,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -549,7 +554,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -604,7 +609,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -686,7 +691,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +790,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -891,7 +896,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -987,7 +992,7 @@ async def list_all_builtins(self, **kwargs: Any) -> _models.PolicyDefinitionVers :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,7 +1048,7 @@ async def list_all_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1100,7 @@ async def list_all(self, **kwargs: Any) -> _models.PolicyDefinitionVersionListRe :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1191,7 +1196,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1261,7 +1266,7 @@ async def delete(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1316,7 @@ async def get(self, **kwargs: Any) -> _models.PolicyDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,7 +1369,7 @@ async def get_built_in(self, **kwargs: Any) -> _models.PolicyDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1480,7 +1485,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :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 delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1609,7 +1614,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1674,7 +1679,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1762,7 +1767,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1852,7 +1857,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2008,7 +2013,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2080,7 +2085,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, @@ -2131,7 +2136,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2185,7 +2190,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2266,7 +2271,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2363,7 +2368,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2509,7 +2514,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2584,7 +2589,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2639,7 +2644,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2724,7 +2729,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2820,7 +2825,7 @@ async def list_all_builtins(self, **kwargs: Any) -> _models.PolicySetDefinitionV :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2876,7 +2881,7 @@ async def list_all_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2928,7 +2933,7 @@ async def list_all(self, **kwargs: Any) -> _models.PolicySetDefinitionVersionLis :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3024,7 +3029,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3094,7 +3099,7 @@ async def delete(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3144,7 +3149,7 @@ async def get(self, **kwargs: Any) -> _models.PolicySetDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3198,7 +3203,7 @@ async def get_built_in(self, **kwargs: Any) -> _models.PolicySetDefinitionVersio :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3263,7 +3268,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3351,7 +3356,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3491,7 +3496,7 @@ async def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3566,7 +3571,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3621,7 +3626,7 @@ async def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3692,7 +3697,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3800,7 +3805,7 @@ async def delete( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3944,7 +3949,7 @@ async def create( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4018,7 +4023,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4161,7 +4166,7 @@ async def update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4260,7 +4265,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4405,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4509,7 +4514,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4614,7 +4619,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4697,7 +4702,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4832,7 +4837,7 @@ async def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4905,7 +4910,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5039,7 +5044,7 @@ async def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/operations/_operations.py index 52736d166e32..2868480dda32 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_04_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2023_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -2076,7 +2081,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2144,7 +2149,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, @@ -2194,7 +2199,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2248,7 +2253,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2371,7 +2376,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2441,7 +2446,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2496,7 +2501,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2578,7 +2583,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2682,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2783,7 +2788,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2879,7 +2884,7 @@ def list_all_builtins(self, **kwargs: Any) -> _models.PolicyDefinitionVersionLis :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2935,7 +2940,7 @@ def list_all_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2987,7 +2992,7 @@ def list_all(self, **kwargs: Any) -> _models.PolicyDefinitionVersionListResult: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3083,7 +3088,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3153,7 +3158,7 @@ def delete(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3203,7 +3208,7 @@ def get(self, **kwargs: Any) -> _models.PolicyDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3256,7 +3261,7 @@ def get_built_in(self, **kwargs: Any) -> _models.PolicyDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3372,7 +3377,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3446,7 +3451,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3499,7 +3504,7 @@ def get_at_management_group(self, management_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3564,7 +3569,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_models.Po api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3650,7 +3655,7 @@ def list_built_in(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3740,7 +3745,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3896,7 +3901,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3968,7 +3973,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, @@ -4019,7 +4024,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4078,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4154,7 +4159,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4251,7 +4256,7 @@ def list_built_in( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4397,7 +4402,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4472,7 +4477,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4527,7 +4532,7 @@ def get_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4612,7 +4617,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4708,7 +4713,7 @@ def list_all_builtins(self, **kwargs: Any) -> _models.PolicySetDefinitionVersion :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4764,7 +4769,7 @@ def list_all_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4816,7 +4821,7 @@ def list_all(self, **kwargs: Any) -> _models.PolicySetDefinitionVersionListResul :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4912,7 +4917,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4982,7 +4987,7 @@ def delete(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5032,7 +5037,7 @@ def get(self, **kwargs: Any) -> _models.PolicySetDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5086,7 +5091,7 @@ def get_built_in(self, **kwargs: Any) -> _models.PolicySetDefinitionVersion: :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5151,7 +5156,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_models.Po api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5237,7 +5242,7 @@ def list_built_in(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5377,7 +5382,7 @@ def create_or_update_at_management_group( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5452,7 +5457,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5505,7 +5510,7 @@ def get_at_management_group(self, management_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicySetDefinitionVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5576,7 +5581,7 @@ def list_by_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicySetDefinitionVersionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5682,7 +5687,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment or 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 create( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5900,7 +5905,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6043,7 +6048,7 @@ def update( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6142,7 +6147,7 @@ def list_for_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6282,7 +6287,7 @@ def list_for_resource( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6391,7 +6396,7 @@ def list_for_management_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6496,7 +6501,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6579,7 +6584,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6714,7 +6719,7 @@ def create_by_id( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6787,7 +6792,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6921,7 +6926,7 @@ def update_by_id( :rtype: ~azure.mgmt.resource.policy.v2023_04_01.models.PolicyAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py index f34fa0661b91..6e961b56191a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/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, Callable, Dict, IO, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,6 +39,10 @@ build_resource_management_private_link_put_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]] @@ -137,7 +142,7 @@ async def put( :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +212,7 @@ async def get(self, group_id: str, pla_id: str, **kwargs: Any) -> _models.Privat :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,7 +268,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, @@ -311,7 +316,7 @@ async def list(self, group_id: str, **kwargs: Any) -> _models.PrivateLinkAssocia :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociationGetResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -452,7 +457,7 @@ async def put( :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +531,7 @@ async def get( :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -584,7 +589,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, @@ -632,7 +637,7 @@ async def list(self, **kwargs: Any) -> _models.ResourceManagementPrivateLinkList ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLinkListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +692,7 @@ async def list_by_resource_group( ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLinkListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py index d493b97e0e44..6be86074a8f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +29,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]] @@ -415,7 +420,7 @@ def put( :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -485,7 +490,7 @@ def get(self, group_id: str, pla_id: str, **kwargs: Any) -> _models.PrivateLinkA :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,7 +546,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, @@ -589,7 +594,7 @@ def list(self, group_id: str, **kwargs: Any) -> _models.PrivateLinkAssociationGe :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.PrivateLinkAssociationGetResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +735,7 @@ def put( :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +807,7 @@ def get(self, resource_group_name: str, rmpl_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -860,7 +865,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, @@ -908,7 +913,7 @@ def list(self, **kwargs: Any) -> _models.ResourceManagementPrivateLinkListResult ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLinkListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -963,7 +968,7 @@ def list_by_resource_group( ~azure.mgmt.resource.privatelinks.v2020_05_01.models.ResourceManagementPrivateLinkListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py index 138120da2d08..cfd4ca866e8d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -102,7 +102,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,7 +206,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +253,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -453,7 +453,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ async def cancel( # 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, @@ -626,7 +626,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -700,7 +700,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +767,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -842,7 +842,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -918,7 +918,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -970,7 +970,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,7 +1034,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1194,8 +1194,8 @@ def list_resources( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: Query parameters. If null is passed returns all resource groups. Default value is None. @@ -1212,7 +1212,7 @@ def list_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1289,7 +1289,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,7 +1386,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1447,7 +1447,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1545,7 +1545,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1654,7 +1654,7 @@ async def patch( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1767,7 +1767,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1843,7 +1843,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1931,7 +1931,7 @@ def __init__(self, *args, **kwargs) -> None: async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2096,8 +2096,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2114,7 +2114,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2209,7 +2209,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2281,7 +2281,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, @@ -2435,7 +2435,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2507,7 +2507,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2763,7 +2763,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2843,7 +2843,7 @@ async def delete_value( # 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, @@ -2894,7 +2894,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2951,7 +2951,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3007,7 +3007,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3060,7 +3060,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3160,7 +3160,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3228,7 +3228,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py index db4945afdad5..35ecb090ee9d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1172,7 +1172,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,7 +1276,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1323,7 +1323,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1523,7 +1523,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1581,7 +1581,7 @@ def cancel( # 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, @@ -1696,7 +1696,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1770,7 +1770,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1837,7 +1837,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1912,7 +1912,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1988,7 +1988,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2040,7 +2040,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2104,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2181,7 +2181,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2262,8 +2262,8 @@ def list_resources( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: Query parameters. If null is passed returns all resource groups. Default value is None. @@ -2280,7 +2280,7 @@ def list_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2357,7 +2357,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2454,7 +2454,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2515,7 +2515,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2613,7 +2613,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2722,7 +2722,7 @@ def patch( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2835,7 +2835,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2911,7 +2911,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2999,7 +2999,7 @@ def __init__(self, *args, **kwargs): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3164,8 +3164,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3182,7 +3182,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3277,7 +3277,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3349,7 +3349,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, @@ -3503,7 +3503,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3575,7 +3575,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3831,7 +3831,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3911,7 +3911,7 @@ def delete_value( # 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, @@ -3962,7 +3962,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4019,7 +4019,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4075,7 +4075,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4128,7 +4128,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4228,7 +4228,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2016_02_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4296,7 +4296,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py index 9e1fe00e4cf4..5b5771a8fa2b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -107,7 +107,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +220,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +267,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +473,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +536,7 @@ async def cancel( # 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, @@ -654,7 +654,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,7 +728,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -797,7 +797,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -872,7 +872,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -949,7 +949,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1002,7 +1002,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1068,7 +1068,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1147,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1227,8 +1227,8 @@ def list_resources( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -1245,7 +1245,7 @@ def list_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1322,7 +1322,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1417,7 +1417,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1478,7 +1478,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1579,7 +1579,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1692,7 +1692,7 @@ async def patch( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1803,7 +1803,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1879,7 +1879,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1967,7 +1967,7 @@ def __init__(self, *args, **kwargs) -> None: async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2147,8 +2147,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2165,7 +2165,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2260,7 +2260,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2312,7 +2312,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2435,7 +2435,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2675,7 +2675,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2931,7 +2931,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2991,7 +2991,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3122,7 +3122,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3311,7 +3311,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3509,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def delete_value( # 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, @@ -3635,7 +3635,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3696,7 +3696,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3754,7 +3754,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3807,7 +3807,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3907,7 +3907,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3975,7 +3975,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py index 4b621ac4ace4..8792919aae8c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1303,7 +1303,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1416,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,7 +1463,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1669,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1732,7 +1732,7 @@ def cancel( # 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, @@ -1850,7 +1850,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1924,7 +1924,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1993,7 +1993,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2068,7 +2068,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2145,7 +2145,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2198,7 +2198,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2264,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2341,7 +2341,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2421,8 +2421,8 @@ def list_resources( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2439,7 +2439,7 @@ def list_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2516,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2611,7 +2611,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2672,7 +2672,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2773,7 +2773,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2886,7 +2886,7 @@ def patch( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2997,7 +2997,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3073,7 +3073,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3161,7 +3161,7 @@ def __init__(self, *args, **kwargs): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3341,8 +3341,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3359,7 +3359,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3454,7 +3454,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3506,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3629,7 +3629,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3869,7 +3869,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4125,7 +4125,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4185,7 +4185,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4225,7 +4225,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4316,7 +4316,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4505,7 +4505,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4703,7 +4703,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4778,7 +4778,7 @@ def delete_value( # 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, @@ -4829,7 +4829,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4890,7 +4890,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,7 +4948,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5001,7 +5001,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5101,7 +5101,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2016_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5169,7 +5169,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py index 3db3bf7ea258..3d5b0fbd7b63 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -108,7 +108,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -221,7 +221,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +268,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -474,7 +474,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -537,7 +537,7 @@ async def cancel( # 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, @@ -655,7 +655,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,7 +729,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -798,7 +798,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +873,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +950,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,7 +1003,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1069,7 +1069,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1148,7 +1148,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1228,8 +1228,8 @@ def list_by_resource_group( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -1246,7 +1246,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1675,8 +1675,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -1693,7 +1693,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1788,7 +1788,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1840,7 +1840,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1963,7 +1963,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2203,7 +2203,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2459,7 +2459,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2519,7 +2519,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2559,7 +2559,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2650,7 +2650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2839,7 +2839,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3037,7 +3037,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3109,7 +3109,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3204,7 +3204,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3265,7 +3265,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3366,7 +3366,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3480,7 +3480,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3591,7 +3591,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3667,7 +3667,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3766,7 +3766,7 @@ async def delete_value( # 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, @@ -3817,7 +3817,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3878,7 +3878,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3936,7 +3936,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3989,7 +3989,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4089,7 +4089,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4157,7 +4157,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py index 704ea60e46e9..4ce41f0c9eba 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1339,7 +1339,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1452,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1499,7 +1499,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1705,7 +1705,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1768,7 +1768,7 @@ def cancel( # 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, @@ -1886,7 +1886,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1960,7 +1960,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2029,7 +2029,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2104,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2181,7 +2181,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2234,7 +2234,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2300,7 +2300,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2377,7 +2377,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2457,8 +2457,8 @@ def list_by_resource_group( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2475,7 +2475,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2544,7 +2544,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2718,7 +2718,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2904,8 +2904,8 @@ def list( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2922,7 +2922,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3017,7 +3017,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3069,7 +3069,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3192,7 +3192,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3432,7 +3432,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3688,7 +3688,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3748,7 +3748,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3788,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3879,7 +3879,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4068,7 +4068,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4266,7 +4266,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4338,7 +4338,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4433,7 +4433,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4494,7 +4494,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4595,7 +4595,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4709,7 +4709,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4820,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4896,7 +4896,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4995,7 +4995,7 @@ def delete_value( # 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 +5046,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5107,7 +5107,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5165,7 +5165,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5218,7 +5218,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5318,7 +5318,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2017_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5386,7 +5386,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py index 4f463ff53764..440603d21ebe 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -108,7 +108,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -221,7 +221,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +268,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -474,7 +474,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -537,7 +537,7 @@ async def cancel( # 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, @@ -655,7 +655,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,7 +729,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -798,7 +798,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +873,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +950,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,7 +1003,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1069,7 +1069,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1148,7 +1148,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1228,8 +1228,8 @@ def list_by_resource_group( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -1246,7 +1246,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1691,7 +1691,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1786,7 +1786,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1838,7 +1838,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2201,7 +2201,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2457,7 +2457,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2517,7 +2517,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2557,7 +2557,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2648,7 +2648,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3035,7 +3035,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3107,7 +3107,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3202,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3263,7 +3263,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3478,7 +3478,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3589,7 +3589,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3665,7 +3665,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3764,7 +3764,7 @@ async def delete_value( # 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, @@ -3815,7 +3815,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3876,7 +3876,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3934,7 +3934,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3987,7 +3987,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4087,7 +4087,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4155,7 +4155,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py index 3ab9e92b2d43..abe4c2baf868 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1339,7 +1339,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1452,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1499,7 +1499,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1705,7 +1705,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1768,7 +1768,7 @@ def cancel( # 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, @@ -1886,7 +1886,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1960,7 +1960,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2029,7 +2029,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2104,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2181,7 +2181,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2234,7 +2234,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2300,7 +2300,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2377,7 +2377,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2457,8 +2457,8 @@ def list_by_resource_group( :param filter: The filter to apply on the operation. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2475,7 +2475,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2544,7 +2544,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2718,7 +2718,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2920,7 +2920,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3015,7 +3015,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3067,7 +3067,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3190,7 +3190,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3430,7 +3430,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3686,7 +3686,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3746,7 +3746,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3786,7 +3786,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3877,7 +3877,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4066,7 +4066,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4264,7 +4264,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4336,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4431,7 +4431,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4492,7 +4492,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4593,7 +4593,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4707,7 +4707,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4818,7 +4818,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4894,7 +4894,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4993,7 +4993,7 @@ def delete_value( # 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, @@ -5044,7 +5044,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5105,7 +5105,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5163,7 +5163,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5216,7 +5216,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5316,7 +5316,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5384,7 +5384,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py index 7b412ab2a985..be233d0f718f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -131,7 +131,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +216,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +320,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +362,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +543,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,7 +602,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +699,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,7 +769,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -834,7 +834,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -901,7 +901,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1014,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1061,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1267,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1330,7 +1330,7 @@ async def cancel( # 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, @@ -1448,7 +1448,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1522,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1591,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1666,7 +1666,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1743,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1796,7 +1796,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1862,7 +1862,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1941,7 +1941,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2034,8 +2034,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2052,7 +2052,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2121,7 +2121,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2295,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2494,8 +2494,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2512,7 +2512,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2607,7 +2607,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2659,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2782,7 +2782,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3022,7 +3022,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3278,7 +3278,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3338,7 +3338,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3378,7 +3378,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3469,7 +3469,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3658,7 +3658,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3856,7 +3856,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3928,7 +3928,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +4029,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4090,7 +4090,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4191,7 +4191,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4305,7 +4305,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4416,7 +4416,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4494,7 +4494,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4593,7 +4593,7 @@ async def delete_value( # 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, @@ -4644,7 +4644,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4705,7 +4705,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4763,7 +4763,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4816,7 +4816,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4913,7 +4913,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4977,7 +4977,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5058,7 +5058,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5126,7 +5126,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py index efaeb3e7894b..e20b871c3821 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1675,7 +1675,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1760,7 +1760,7 @@ def __init__(self, *args, **kwargs): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1864,7 +1864,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1906,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2087,7 +2087,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2146,7 +2146,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2243,7 +2243,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2313,7 +2313,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2378,7 +2378,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2445,7 +2445,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2558,7 +2558,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2605,7 +2605,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2811,7 +2811,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2874,7 +2874,7 @@ def cancel( # 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, @@ -2992,7 +2992,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3066,7 +3066,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3135,7 +3135,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3210,7 +3210,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3287,7 +3287,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3340,7 +3340,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3406,7 +3406,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3483,7 +3483,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,8 +3576,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3594,7 +3594,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3663,7 +3663,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3837,7 +3837,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4036,8 +4036,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4054,7 +4054,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4149,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4201,7 +4201,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4324,7 +4324,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4564,7 +4564,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4820,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4880,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4920,7 +4920,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5011,7 +5011,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5200,7 +5200,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5398,7 +5398,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5470,7 +5470,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5571,7 +5571,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5632,7 +5632,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5733,7 +5733,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5847,7 +5847,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5958,7 +5958,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6036,7 +6036,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6135,7 +6135,7 @@ def delete_value( # 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, @@ -6186,7 +6186,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6247,7 +6247,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6305,7 +6305,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6358,7 +6358,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6455,7 +6455,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6519,7 +6519,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6600,7 +6600,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2018_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6668,7 +6668,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py index fb68ed61c078..5437532ade90 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -131,7 +131,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +216,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +320,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +362,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +543,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,7 +602,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +699,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,7 +769,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -834,7 +834,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -901,7 +901,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1014,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1061,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1267,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1330,7 +1330,7 @@ async def cancel( # 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, @@ -1448,7 +1448,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1522,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1591,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1666,7 +1666,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1743,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1796,7 +1796,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1862,7 +1862,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1941,7 +1941,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2034,8 +2034,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2052,7 +2052,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2121,7 +2121,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2295,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2494,8 +2494,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2512,7 +2512,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2607,7 +2607,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2659,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2782,7 +2782,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3022,7 +3022,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3278,7 +3278,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3338,7 +3338,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3378,7 +3378,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3469,7 +3469,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3658,7 +3658,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3856,7 +3856,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3928,7 +3928,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +4029,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4090,7 +4090,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4191,7 +4191,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4305,7 +4305,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4416,7 +4416,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4494,7 +4494,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4593,7 +4593,7 @@ async def delete_value( # 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, @@ -4644,7 +4644,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4705,7 +4705,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4763,7 +4763,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4816,7 +4816,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4913,7 +4913,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4977,7 +4977,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5058,7 +5058,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5126,7 +5126,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py index 5127cf40bc8a..c65bb9586cb9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1675,7 +1675,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1760,7 +1760,7 @@ def __init__(self, *args, **kwargs): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1864,7 +1864,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1906,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2087,7 +2087,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2146,7 +2146,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2243,7 +2243,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2313,7 +2313,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2378,7 +2378,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2445,7 +2445,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2558,7 +2558,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2605,7 +2605,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2811,7 +2811,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2874,7 +2874,7 @@ def cancel( # 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, @@ -2992,7 +2992,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3066,7 +3066,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3135,7 +3135,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3210,7 +3210,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3287,7 +3287,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3340,7 +3340,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3406,7 +3406,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3483,7 +3483,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,8 +3576,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3594,7 +3594,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3663,7 +3663,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3837,7 +3837,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4036,8 +4036,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4054,7 +4054,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4149,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4201,7 +4201,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4324,7 +4324,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4564,7 +4564,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4820,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4880,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4920,7 +4920,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5011,7 +5011,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5200,7 +5200,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5398,7 +5398,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5470,7 +5470,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5571,7 +5571,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5632,7 +5632,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5733,7 +5733,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5847,7 +5847,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5958,7 +5958,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6036,7 +6036,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6135,7 +6135,7 @@ def delete_value( # 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, @@ -6186,7 +6186,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6247,7 +6247,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6305,7 +6305,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6358,7 +6358,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6455,7 +6455,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6519,7 +6519,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6600,7 +6600,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_03_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6668,7 +6668,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py index 54b178436c52..c67564fc7878 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -141,7 +141,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +226,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +339,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +381,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +580,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +641,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -751,7 +751,7 @@ async def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +823,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -890,7 +890,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -957,7 +957,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1061,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1103,7 +1103,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1284,7 +1284,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1343,7 +1343,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1440,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1510,7 +1510,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1575,7 +1575,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1642,7 +1642,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1802,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2008,7 +2008,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2071,7 +2071,7 @@ async def cancel( # 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, @@ -2189,7 +2189,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2263,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2332,7 +2332,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2407,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2484,7 +2484,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2537,7 +2537,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2603,7 +2603,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2682,7 +2682,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2775,8 +2775,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2793,7 +2793,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2862,7 +2862,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3036,7 +3036,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3235,8 +3235,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3253,7 +3253,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3348,7 +3348,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3400,7 +3400,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3523,7 +3523,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3763,7 +3763,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4019,7 +4019,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4079,7 +4079,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4119,7 +4119,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4210,7 +4210,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4399,7 +4399,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4597,7 +4597,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4669,7 +4669,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4770,7 +4770,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4831,7 +4831,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4932,7 +4932,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5046,7 +5046,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5157,7 +5157,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5235,7 +5235,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5334,7 +5334,7 @@ async def delete_value( # 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, @@ -5385,7 +5385,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5446,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5504,7 +5504,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5557,7 +5557,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5656,7 +5656,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5722,7 +5722,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5800,7 +5800,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5864,7 +5864,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5945,7 +5945,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6013,7 +6013,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py index 1b1bb7f0b57d..899f9c9e44bc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1987,7 +1987,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2072,7 +2072,7 @@ def __init__(self, *args, **kwargs): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2185,7 +2185,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2227,7 +2227,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2426,7 +2426,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2487,7 +2487,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2597,7 +2597,7 @@ def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2669,7 +2669,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2736,7 +2736,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2803,7 +2803,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2907,7 +2907,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2949,7 +2949,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3130,7 +3130,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3189,7 +3189,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3286,7 +3286,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3356,7 +3356,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3421,7 +3421,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3488,7 +3488,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3601,7 +3601,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3648,7 +3648,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3854,7 +3854,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ def cancel( # 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, @@ -4035,7 +4035,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4109,7 +4109,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4178,7 +4178,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4253,7 +4253,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4330,7 +4330,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4383,7 +4383,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4449,7 +4449,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4526,7 +4526,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4619,8 +4619,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4637,7 +4637,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4706,7 +4706,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4880,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5079,8 +5079,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5097,7 +5097,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5192,7 +5192,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5244,7 +5244,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5367,7 +5367,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5607,7 +5607,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5863,7 +5863,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5923,7 +5923,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5963,7 +5963,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6054,7 +6054,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6243,7 +6243,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6441,7 +6441,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6513,7 +6513,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6614,7 +6614,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6675,7 +6675,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6776,7 +6776,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6890,7 +6890,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7001,7 +7001,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7079,7 +7079,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7178,7 +7178,7 @@ def delete_value( # 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, @@ -7229,7 +7229,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7290,7 +7290,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7348,7 +7348,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7401,7 +7401,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7500,7 +7500,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7566,7 +7566,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7644,7 +7644,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7708,7 +7708,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7789,7 +7789,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7857,7 +7857,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py index 3816870bce49..21df3d009eac 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -143,7 +143,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +228,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +341,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -383,7 +383,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +582,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +753,7 @@ async def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +825,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,7 +892,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,7 +959,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1063,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,7 +1105,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1286,7 +1286,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1345,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1442,7 +1442,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1512,7 +1512,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1577,7 +1577,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1644,7 +1644,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1757,7 +1757,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1804,7 +1804,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2010,7 +2010,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2073,7 +2073,7 @@ async def cancel( # 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, @@ -2191,7 +2191,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2265,7 +2265,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2334,7 +2334,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2409,7 +2409,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2486,7 +2486,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2539,7 +2539,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2605,7 +2605,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2693,7 +2693,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2771,7 +2771,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2829,7 +2829,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2921,8 +2921,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -2939,7 +2939,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3008,7 +3008,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3182,7 +3182,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3381,8 +3381,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -3399,7 +3399,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3494,7 +3494,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3546,7 +3546,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3669,7 +3669,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3909,7 +3909,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4165,7 +4165,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4225,7 +4225,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4265,7 +4265,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4356,7 +4356,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4545,7 +4545,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4743,7 +4743,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4815,7 +4815,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4916,7 +4916,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4977,7 +4977,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5078,7 +5078,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5192,7 +5192,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5303,7 +5303,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5381,7 +5381,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5480,7 +5480,7 @@ async def delete_value( # 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, @@ -5531,7 +5531,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5592,7 +5592,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5650,7 +5650,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5703,7 +5703,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5802,7 +5802,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5868,7 +5868,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5946,7 +5946,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6010,7 +6010,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6091,7 +6091,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6159,7 +6159,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py index a365345cd74e..036f97a27a5f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2040,7 +2040,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2125,7 @@ def __init__(self, *args, **kwargs): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2238,7 +2238,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2280,7 +2280,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2479,7 +2479,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2540,7 +2540,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2650,7 +2650,7 @@ def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2722,7 +2722,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2789,7 +2789,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2856,7 +2856,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2960,7 +2960,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3002,7 +3002,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3183,7 +3183,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3242,7 +3242,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3339,7 +3339,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3409,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3474,7 +3474,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3541,7 +3541,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3654,7 +3654,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3701,7 +3701,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3907,7 +3907,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3970,7 +3970,7 @@ def cancel( # 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, @@ -4088,7 +4088,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4162,7 +4162,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4231,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4306,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4383,7 +4383,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4436,7 +4436,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4502,7 +4502,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4590,7 +4590,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4666,7 +4666,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4724,7 +4724,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4816,8 +4816,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4834,7 +4834,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4903,7 +4903,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5077,7 +5077,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5276,8 +5276,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5294,7 +5294,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5389,7 +5389,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5441,7 +5441,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5564,7 +5564,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5804,7 +5804,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6060,7 +6060,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6120,7 +6120,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6160,7 +6160,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6251,7 +6251,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6440,7 +6440,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6638,7 +6638,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6710,7 +6710,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6811,7 +6811,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6872,7 +6872,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6973,7 +6973,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7087,7 +7087,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7198,7 +7198,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7276,7 +7276,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7375,7 +7375,7 @@ def delete_value( # 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, @@ -7426,7 +7426,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7487,7 +7487,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7545,7 +7545,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7598,7 +7598,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7697,7 +7697,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7763,7 +7763,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7841,7 +7841,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7905,7 +7905,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7986,7 +7986,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8054,7 +8054,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py index 1b85e703599b..3a0dee40b3f3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -165,7 +165,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +250,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +359,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +401,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -598,7 +598,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -659,7 +659,7 @@ async def cancel_at_scope( # 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, @@ -769,7 +769,7 @@ async def validate_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -841,7 +841,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +908,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -975,7 +975,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1078,7 +1078,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1119,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1299,7 +1299,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1357,7 +1357,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1453,7 +1453,7 @@ async def validate_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1522,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1586,7 +1586,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1652,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1765,7 +1765,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1807,7 +1807,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2006,7 +2006,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2067,7 +2067,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2177,7 +2177,7 @@ async def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2249,7 +2249,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2316,7 +2316,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2383,7 +2383,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2487,7 +2487,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2529,7 +2529,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2710,7 +2710,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2769,7 +2769,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2866,7 +2866,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2927,7 +2927,7 @@ async def validate_at_subscription_scope( async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3178,7 +3178,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3245,7 +3245,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3358,7 +3358,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3405,7 +3405,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3611,7 +3611,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3674,7 +3674,7 @@ async def cancel( # 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, @@ -3792,7 +3792,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3858,7 +3858,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4069,7 +4069,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4138,7 +4138,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4213,7 +4213,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4290,7 +4290,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4343,7 +4343,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4409,7 +4409,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4497,7 +4497,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4575,7 +4575,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4633,7 +4633,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4725,8 +4725,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4743,7 +4743,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4812,7 +4812,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4986,7 +4986,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5185,8 +5185,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5203,7 +5203,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5298,7 +5298,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5350,7 +5350,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5473,7 +5473,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5713,7 +5713,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5969,7 +5969,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6029,7 +6029,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6069,7 +6069,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6160,7 +6160,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6349,7 +6349,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6547,7 +6547,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6619,7 +6619,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6720,7 +6720,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6781,7 +6781,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6882,7 +6882,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6996,7 +6996,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7107,7 +7107,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7185,7 +7185,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7284,7 +7284,7 @@ async def delete_value( # 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, @@ -7335,7 +7335,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7396,7 +7396,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7454,7 +7454,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7507,7 +7507,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7606,7 +7606,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7672,7 +7672,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7750,7 +7750,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7813,7 +7813,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7892,7 +7892,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7958,7 +7958,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8036,7 +8036,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8100,7 +8100,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8181,7 +8181,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8249,7 +8249,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py index 4accc57d866a..f76e280e1c74 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2811,7 +2811,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2896,7 +2896,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3005,7 +3005,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3047,7 +3047,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3244,7 +3244,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3305,7 +3305,7 @@ def cancel_at_scope( # 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, @@ -3415,7 +3415,7 @@ def validate_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3487,7 +3487,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3554,7 +3554,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3621,7 +3621,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3724,7 +3724,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3765,7 +3765,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3945,7 +3945,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4003,7 +4003,7 @@ def cancel_at_tenant_scope( # 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, @@ -4099,7 +4099,7 @@ def validate_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4230,7 +4230,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4296,7 +4296,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4409,7 +4409,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4451,7 +4451,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4650,7 +4650,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4711,7 +4711,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4821,7 +4821,7 @@ def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4893,7 +4893,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4960,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5027,7 +5027,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5131,7 +5131,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5173,7 +5173,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5354,7 +5354,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5413,7 +5413,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5510,7 +5510,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5571,7 +5571,7 @@ def validate_at_subscription_scope( def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5757,7 +5757,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,7 +5822,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5889,7 +5889,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6002,7 +6002,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6049,7 +6049,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6255,7 +6255,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6318,7 +6318,7 @@ def cancel( # 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, @@ -6436,7 +6436,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6502,7 +6502,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6713,7 +6713,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6782,7 +6782,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6857,7 +6857,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6934,7 +6934,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6987,7 +6987,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7053,7 +7053,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7141,7 +7141,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7217,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7275,7 +7275,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7367,8 +7367,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -7385,7 +7385,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7454,7 +7454,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7628,7 +7628,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7827,8 +7827,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -7845,7 +7845,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7940,7 +7940,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7992,7 +7992,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8115,7 +8115,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8355,7 +8355,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8611,7 +8611,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8671,7 +8671,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8711,7 +8711,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8802,7 +8802,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8991,7 +8991,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9189,7 +9189,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9261,7 +9261,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9362,7 +9362,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9423,7 +9423,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9524,7 +9524,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9638,7 +9638,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9749,7 +9749,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.ResourceGroupExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9827,7 +9827,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9926,7 +9926,7 @@ def delete_value( # 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, @@ -9977,7 +9977,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10038,7 +10038,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10096,7 +10096,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10149,7 +10149,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10248,7 +10248,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10314,7 +10314,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10392,7 +10392,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10455,7 +10455,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10534,7 +10534,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10600,7 +10600,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10678,7 +10678,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10742,7 +10742,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10823,7 +10823,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10891,7 +10891,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py index c841c9d932ff..67e36539ae44 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -165,7 +165,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +250,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +359,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +401,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -598,7 +598,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -659,7 +659,7 @@ async def cancel_at_scope( # 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, @@ -769,7 +769,7 @@ async def validate_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -841,7 +841,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +908,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -975,7 +975,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1078,7 +1078,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1119,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1300,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1358,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1455,7 +1455,7 @@ async def validate_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1524,7 +1524,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1588,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1654,7 +1654,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1767,7 +1767,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1809,7 +1809,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2009,7 +2009,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2070,7 +2070,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2181,7 +2181,7 @@ async def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2253,7 +2253,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2320,7 +2320,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2387,7 +2387,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2491,7 +2491,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2533,7 +2533,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2714,7 +2714,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2773,7 +2773,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2870,7 +2870,7 @@ async def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2931,7 +2931,7 @@ async def validate_at_subscription_scope( async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3117,7 +3117,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3182,7 +3182,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3249,7 +3249,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3409,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3615,7 +3615,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3678,7 +3678,7 @@ async def cancel( # 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, @@ -3796,7 +3796,7 @@ async def validate( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3862,7 +3862,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4073,7 +4073,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4142,7 +4142,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4217,7 +4217,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4294,7 +4294,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4347,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4413,7 +4413,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,7 +4501,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4579,7 +4579,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4637,7 +4637,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4730,8 +4730,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -4748,7 +4748,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4817,7 +4817,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4991,7 +4991,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5191,8 +5191,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5209,7 +5209,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5304,7 +5304,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5356,7 +5356,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5479,7 +5479,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5719,7 +5719,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5975,7 +5975,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6035,7 +6035,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6075,7 +6075,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6166,7 +6166,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6355,7 +6355,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6553,7 +6553,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6625,7 +6625,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6726,7 +6726,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6787,7 +6787,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6888,7 +6888,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7002,7 +7002,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7059,7 +7059,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7252,7 +7252,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7351,7 +7351,7 @@ async def delete_value( # 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, @@ -7402,7 +7402,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7463,7 +7463,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7521,7 +7521,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7574,7 +7574,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7673,7 +7673,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7739,7 +7739,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7817,7 +7817,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7880,7 +7880,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7959,7 +7959,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8025,7 +8025,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8103,7 +8103,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8167,7 +8167,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8248,7 +8248,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8316,7 +8316,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py index e527a61f7c3a..2f9b3670078b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2811,7 +2811,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2896,7 +2896,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3005,7 +3005,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3047,7 +3047,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3244,7 +3244,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3305,7 +3305,7 @@ def cancel_at_scope( # 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, @@ -3415,7 +3415,7 @@ def validate_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3487,7 +3487,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3554,7 +3554,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3621,7 +3621,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3724,7 +3724,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3765,7 +3765,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3946,7 +3946,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4004,7 +4004,7 @@ def cancel_at_tenant_scope( # 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, @@ -4101,7 +4101,7 @@ def validate_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4168,7 +4168,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4232,7 +4232,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4298,7 +4298,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4411,7 +4411,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4453,7 +4453,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4653,7 +4653,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4714,7 +4714,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4825,7 +4825,7 @@ def validate_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4897,7 +4897,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4964,7 +4964,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5031,7 +5031,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5135,7 +5135,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5177,7 +5177,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5358,7 +5358,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5417,7 +5417,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5514,7 @@ def validate_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5575,7 +5575,7 @@ def validate_at_subscription_scope( def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5761,7 +5761,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5826,7 +5826,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5893,7 +5893,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6006,7 +6006,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6053,7 +6053,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6259,7 +6259,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6322,7 +6322,7 @@ def cancel( # 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, @@ -6440,7 +6440,7 @@ def validate( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6506,7 +6506,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6717,7 +6717,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6786,7 +6786,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6861,7 +6861,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6938,7 +6938,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6991,7 +6991,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7057,7 +7057,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7145,7 +7145,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7221,7 +7221,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7279,7 +7279,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7372,8 +7372,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -7390,7 +7390,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7459,7 +7459,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7633,7 +7633,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7833,8 +7833,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -7851,7 +7851,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7946,7 +7946,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7998,7 +7998,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8121,7 +8121,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8361,7 +8361,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8617,7 +8617,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8677,7 +8677,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8717,7 +8717,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8808,7 +8808,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8997,7 +8997,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9195,7 +9195,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9267,7 +9267,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9368,7 +9368,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9429,7 +9429,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9530,7 +9530,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9644,7 +9644,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9701,7 +9701,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9894,7 +9894,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9993,7 +9993,7 @@ def delete_value( # 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, @@ -10044,7 +10044,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10105,7 +10105,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10163,7 +10163,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10216,7 +10216,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10315,7 +10315,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10381,7 +10381,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10459,7 +10459,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10522,7 +10522,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10601,7 +10601,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10667,7 +10667,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10745,7 +10745,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10809,7 +10809,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10890,7 +10890,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_08_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10958,7 +10958,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py index fc146421d859..ff3325436c2a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -171,7 +171,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -256,7 +256,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -365,7 +365,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,7 +407,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -604,7 +604,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -665,7 +665,7 @@ async def cancel_at_scope( # 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, @@ -706,7 +706,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,7 +903,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -970,7 +970,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1037,7 +1037,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1140,7 +1140,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1181,7 +1181,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1362,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1420,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1460,7 +1460,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1632,7 +1632,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1817,7 +1817,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1947,7 +1947,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2060,7 +2060,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2102,7 +2102,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2302,7 +2302,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2363,7 +2363,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2404,7 +2404,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2595,7 +2595,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2801,7 +2801,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2868,7 +2868,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2935,7 +2935,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3039,7 +3039,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3081,7 +3081,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3262,7 +3262,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,7 +3321,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3534,7 +3534,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3720,7 +3720,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3785,7 +3785,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3852,7 +3852,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3965,7 +3965,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4012,7 +4012,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4218,7 +4218,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4281,7 +4281,7 @@ async def cancel( # 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, @@ -4327,7 +4327,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4525,7 +4525,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4736,7 +4736,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4805,7 +4805,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4880,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4957,7 +4957,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5010,7 +5010,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5076,7 +5076,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5164,7 +5164,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5242,7 +5242,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5300,7 +5300,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5393,8 +5393,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5411,7 +5411,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5480,7 +5480,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5654,7 +5654,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5854,8 +5854,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5872,7 +5872,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5967,7 +5967,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6019,7 +6019,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6142,7 +6142,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6382,7 +6382,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6638,7 +6638,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6698,7 +6698,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6738,7 +6738,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6829,7 +6829,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7018,7 +7018,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7216,7 +7216,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7288,7 +7288,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7389,7 +7389,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7450,7 +7450,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7551,7 +7551,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7665,7 +7665,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7722,7 +7722,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7915,7 +7915,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8018,7 +8018,7 @@ async def delete_value( # 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, @@ -8072,7 +8072,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8134,7 +8134,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8194,7 +8194,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8252,7 +8252,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8373,7 +8373,7 @@ async def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8503,7 +8503,7 @@ async def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8568,7 +8568,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8623,7 +8623,7 @@ async def delete_at_scope( # 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, @@ -8697,7 +8697,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8763,7 +8763,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8841,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8904,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8983,7 +8983,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9049,7 +9049,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9127,7 +9127,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9191,7 +9191,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9272,7 +9272,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9340,7 +9340,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py index 8cd54e8db117..9c0a5564bbb1 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2981,7 +2981,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3066,7 +3066,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3175,7 +3175,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3217,7 +3217,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3414,7 +3414,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3475,7 +3475,7 @@ def cancel_at_scope( # 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, @@ -3516,7 +3516,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3713,7 +3713,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3780,7 +3780,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3847,7 +3847,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3950,7 +3950,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3991,7 +3991,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4172,7 +4172,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4230,7 +4230,7 @@ def cancel_at_tenant_scope( # 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, @@ -4270,7 +4270,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4442,7 +4442,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4625,7 +4625,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4689,7 +4689,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4755,7 +4755,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4868,7 +4868,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4910,7 +4910,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5110,7 +5110,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5171,7 +5171,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5212,7 +5212,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5403,7 +5403,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5609,7 +5609,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5676,7 +5676,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5743,7 +5743,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5847,7 +5847,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5889,7 +5889,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6070,7 +6070,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6129,7 +6129,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6170,7 +6170,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6342,7 +6342,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6528,7 +6528,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6593,7 +6593,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6660,7 +6660,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6773,7 +6773,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6820,7 +6820,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7026,7 +7026,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7089,7 +7089,7 @@ def cancel( # 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, @@ -7135,7 +7135,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7333,7 +7333,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7544,7 +7544,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7613,7 +7613,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7688,7 +7688,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7765,7 +7765,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7818,7 +7818,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7884,7 +7884,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7972,7 +7972,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8048,7 +8048,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8106,7 +8106,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8199,8 +8199,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8217,7 +8217,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8286,7 +8286,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8460,7 +8460,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8660,8 +8660,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8678,7 +8678,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8773,7 +8773,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8825,7 +8825,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8948,7 +8948,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9188,7 +9188,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9444,7 +9444,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9504,7 +9504,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9544,7 +9544,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9635,7 +9635,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9824,7 +9824,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10022,7 +10022,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10094,7 +10094,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10195,7 +10195,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10256,7 +10256,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10357,7 +10357,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10471,7 +10471,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10528,7 +10528,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10721,7 +10721,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10824,7 +10824,7 @@ def delete_value( # 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, @@ -10878,7 +10878,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10940,7 +10940,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11000,7 +11000,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11058,7 +11058,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11179,7 +11179,7 @@ def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11309,7 +11309,7 @@ def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11374,7 +11374,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11427,7 +11427,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11501,7 +11501,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11567,7 +11567,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11645,7 +11645,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11708,7 +11708,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11787,7 +11787,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11853,7 +11853,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11931,7 +11931,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11995,7 +11995,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12076,7 +12076,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12144,7 +12144,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py index 55fee081349e..5379b0606c1e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -172,7 +172,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +257,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +366,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -408,7 +408,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -605,7 +605,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -666,7 +666,7 @@ async def cancel_at_scope( # 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, @@ -707,7 +707,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -904,7 +904,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -971,7 +971,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,7 +1038,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1141,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1182,7 +1182,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1363,7 +1363,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1421,7 +1421,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1461,7 +1461,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1633,7 +1633,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1818,7 +1818,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1882,7 +1882,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1948,7 +1948,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2061,7 +2061,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2103,7 +2103,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2303,7 +2303,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2364,7 +2364,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2405,7 +2405,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2596,7 +2596,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2802,7 +2802,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2869,7 +2869,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2936,7 +2936,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3040,7 +3040,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3082,7 +3082,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3263,7 +3263,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3322,7 +3322,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3363,7 +3363,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3535,7 +3535,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3721,7 +3721,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3786,7 +3786,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3853,7 +3853,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3966,7 +3966,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4013,7 +4013,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4219,7 +4219,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4282,7 +4282,7 @@ async def cancel( # 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, @@ -4328,7 +4328,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4526,7 +4526,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4737,7 +4737,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4806,7 +4806,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4881,7 +4881,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4958,7 +4958,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5015,7 +5015,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5064,7 +5064,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5130,7 +5130,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5218,7 +5218,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5296,7 +5296,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5354,7 +5354,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5447,8 +5447,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5465,7 +5465,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5534,7 +5534,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5708,7 +5708,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5908,8 +5908,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5926,7 +5926,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6021,7 +6021,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6073,7 +6073,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6196,7 +6196,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6436,7 +6436,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6692,7 +6692,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6752,7 +6752,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6792,7 +6792,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6883,7 +6883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7072,7 +7072,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7270,7 +7270,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7342,7 +7342,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7443,7 +7443,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7504,7 +7504,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7614,7 +7614,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7728,7 +7728,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7785,7 +7785,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7978,7 +7978,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8081,7 +8081,7 @@ async def delete_value( # 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, @@ -8135,7 +8135,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8197,7 +8197,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8257,7 +8257,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8315,7 +8315,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8436,7 +8436,7 @@ async def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8566,7 +8566,7 @@ async def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8631,7 +8631,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8686,7 +8686,7 @@ async def delete_at_scope( # 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, @@ -8760,7 +8760,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8826,7 +8826,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8904,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8967,7 +8967,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9046,7 +9046,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9112,7 +9112,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9190,7 +9190,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9254,7 +9254,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9335,7 +9335,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9403,7 +9403,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py index 066356731349..51de84f1d128 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2907,7 +2907,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2992,7 +2992,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3101,7 +3101,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3143,7 +3143,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3340,7 +3340,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3401,7 +3401,7 @@ def cancel_at_scope( # 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, @@ -3442,7 +3442,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3639,7 +3639,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3706,7 +3706,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3773,7 +3773,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3876,7 +3876,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4098,7 +4098,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4156,7 @@ def cancel_at_tenant_scope( # 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, @@ -4196,7 +4196,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4368,7 +4368,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4551,7 +4551,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4615,7 +4615,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4681,7 +4681,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4794,7 +4794,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4836,7 +4836,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5036,7 +5036,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5097,7 +5097,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5138,7 +5138,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5329,7 +5329,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5535,7 +5535,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5602,7 +5602,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5669,7 +5669,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5773,7 +5773,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5815,7 +5815,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5996,7 +5996,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6055,7 +6055,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6096,7 +6096,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6268,7 +6268,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6454,7 +6454,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6519,7 +6519,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6586,7 +6586,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6699,7 +6699,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6746,7 +6746,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6952,7 +6952,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7015,7 +7015,7 @@ def cancel( # 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, @@ -7061,7 +7061,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7259,7 +7259,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7470,7 +7470,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7539,7 +7539,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7614,7 +7614,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7691,7 +7691,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7748,7 +7748,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7797,7 +7797,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7863,7 +7863,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7951,7 +7951,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8027,7 +8027,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8085,7 +8085,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8178,8 +8178,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8196,7 +8196,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8265,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8439,7 +8439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8639,8 +8639,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8657,7 +8657,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8752,7 +8752,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8804,7 +8804,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8927,7 +8927,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9167,7 +9167,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9423,7 +9423,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9483,7 +9483,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9523,7 +9523,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9614,7 +9614,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9803,7 +9803,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10001,7 +10001,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10073,7 +10073,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10174,7 +10174,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10235,7 +10235,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10345,7 +10345,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10459,7 +10459,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10516,7 +10516,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10709,7 +10709,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10812,7 +10812,7 @@ def delete_value( # 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, @@ -10866,7 +10866,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10928,7 +10928,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10988,7 +10988,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11046,7 +11046,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11167,7 +11167,7 @@ def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11297,7 +11297,7 @@ def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11362,7 +11362,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11415,7 +11415,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11489,7 +11489,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11555,7 +11555,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11633,7 +11633,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11696,7 +11696,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11775,7 +11775,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11841,7 +11841,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11919,7 +11919,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11983,7 +11983,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12064,7 +12064,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2020_06_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12132,7 +12132,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py index 1fb0edf2c2b4..19f25b15dd5e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -173,7 +173,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +258,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +367,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +409,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +606,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,7 +667,7 @@ async def cancel_at_scope( # 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, @@ -708,7 +708,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -905,7 +905,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -972,7 +972,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1039,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1142,7 +1142,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1183,7 +1183,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,7 +1364,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1422,7 +1422,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1462,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,7 +1634,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1883,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1949,7 +1949,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2062,7 +2062,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2104,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2304,7 +2304,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2365,7 +2365,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2406,7 +2406,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2597,7 +2597,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2803,7 +2803,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2870,7 +2870,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2937,7 +2937,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3041,7 +3041,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3083,7 +3083,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3264,7 +3264,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3323,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3536,7 +3536,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3722,7 +3722,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3787,7 +3787,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3854,7 +3854,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3967,7 +3967,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4014,7 +4014,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4220,7 +4220,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4283,7 +4283,7 @@ async def cancel( # 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, @@ -4329,7 +4329,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4527,7 +4527,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4738,7 +4738,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4807,7 +4807,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4882,7 +4882,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4959,7 +4959,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5016,7 +5016,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5065,7 +5065,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5131,7 +5131,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5219,7 +5219,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5355,7 +5355,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5433,7 +5433,7 @@ async def list( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5525,8 +5525,8 @@ def list_by_resource_group( plan/name, identity and identity/principalId. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5543,7 +5543,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5612,7 +5612,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5786,7 +5786,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5984,8 +5984,8 @@ def list( plan/name, identity and identity/principalId. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -6002,7 +6002,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6097,7 +6097,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6149,7 +6149,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6272,7 +6272,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6512,7 +6512,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6768,7 +6768,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6828,7 +6828,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6868,7 +6868,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6959,7 +6959,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7148,7 +7148,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7346,7 +7346,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7418,7 +7418,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7519,7 +7519,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7580,7 +7580,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7681,7 +7681,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7795,7 +7795,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7852,7 +7852,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8045,7 +8045,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8148,7 +8148,7 @@ async def delete_value( # 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, @@ -8202,7 +8202,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8264,7 +8264,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8324,7 +8324,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8382,7 +8382,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8503,7 +8503,7 @@ async def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8633,7 +8633,7 @@ async def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8698,7 +8698,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8753,7 +8753,7 @@ async def delete_at_scope( # 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, @@ -8827,7 +8827,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8893,7 +8893,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8971,7 +8971,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9034,7 +9034,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9113,7 +9113,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9179,7 +9179,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9257,7 +9257,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9321,7 +9321,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9402,7 +9402,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9470,7 +9470,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py index 18f61b4064ae..6c2ff2575e8b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2934,7 +2934,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3019,7 +3019,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3128,7 +3128,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3170,7 +3170,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3367,7 +3367,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3428,7 +3428,7 @@ def cancel_at_scope( # 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, @@ -3469,7 +3469,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3666,7 +3666,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3733,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3800,7 +3800,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3903,7 +3903,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3944,7 +3944,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4125,7 +4125,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4183,7 +4183,7 @@ def cancel_at_tenant_scope( # 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, @@ -4223,7 +4223,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4395,7 +4395,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4578,7 +4578,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4642,7 +4642,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4708,7 +4708,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4821,7 +4821,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4863,7 +4863,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5063,7 +5063,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5124,7 +5124,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5165,7 +5165,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5356,7 +5356,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5562,7 +5562,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5629,7 +5629,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5696,7 +5696,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5800,7 +5800,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5842,7 +5842,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6023,7 +6023,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6082,7 +6082,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6123,7 +6123,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6295,7 +6295,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6481,7 +6481,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6546,7 +6546,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6613,7 +6613,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6726,7 +6726,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6773,7 +6773,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6979,7 +6979,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7042,7 +7042,7 @@ def cancel( # 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, @@ -7088,7 +7088,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7286,7 +7286,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7497,7 +7497,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7566,7 +7566,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7641,7 +7641,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7718,7 +7718,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7775,7 +7775,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7824,7 +7824,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7890,7 +7890,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7978,7 +7978,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8054,7 +8054,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8112,7 +8112,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8190,7 +8190,7 @@ def list( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8282,8 +8282,8 @@ def list_by_resource_group( plan/name, identity and identity/principalId. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8300,7 +8300,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8369,7 +8369,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8543,7 +8543,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8741,8 +8741,8 @@ def list( plan/name, identity and identity/principalId. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8759,7 +8759,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8854,7 +8854,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8906,7 +8906,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9029,7 +9029,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9269,7 +9269,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9525,7 +9525,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9585,7 +9585,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9625,7 +9625,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9716,7 +9716,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9905,7 +9905,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10103,7 +10103,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10175,7 +10175,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10276,7 +10276,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10337,7 +10337,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10438,7 +10438,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10552,7 +10552,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10609,7 +10609,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10802,7 +10802,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10905,7 +10905,7 @@ def delete_value( # 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, @@ -10959,7 +10959,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11021,7 +11021,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11081,7 +11081,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11139,7 +11139,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11260,7 +11260,7 @@ def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11390,7 +11390,7 @@ def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11455,7 +11455,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11508,7 +11508,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11582,7 +11582,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11648,7 +11648,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11726,7 +11726,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11789,7 +11789,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11868,7 +11868,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11934,7 +11934,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12012,7 +12012,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12076,7 +12076,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12157,7 +12157,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2020_10_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12225,7 +12225,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py index eb92a337c1ca..9cb9293eb383 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -173,7 +173,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +258,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +367,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +409,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +606,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,7 +667,7 @@ async def cancel_at_scope( # 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, @@ -708,7 +708,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -905,7 +905,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -972,7 +972,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1039,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1142,7 +1142,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1183,7 +1183,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,7 +1364,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1422,7 +1422,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1462,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,7 +1634,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1883,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1949,7 +1949,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2062,7 +2062,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2104,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2304,7 +2304,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2365,7 +2365,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2406,7 +2406,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2597,7 +2597,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2803,7 +2803,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2870,7 +2870,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2937,7 +2937,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3041,7 +3041,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3083,7 +3083,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3264,7 +3264,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3323,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3536,7 +3536,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3722,7 +3722,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3787,7 +3787,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3854,7 +3854,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3967,7 +3967,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4014,7 +4014,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4220,7 +4220,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4283,7 +4283,7 @@ async def cancel( # 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, @@ -4329,7 +4329,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4527,7 +4527,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4738,7 +4738,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4807,7 +4807,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4882,7 +4882,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4959,7 +4959,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5016,7 +5016,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5065,7 +5065,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5131,7 +5131,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5219,7 +5219,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5355,7 +5355,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5433,7 +5433,7 @@ async def list( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5527,8 +5527,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5545,7 +5545,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5614,7 +5614,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5788,7 +5788,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,8 +5988,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -6006,7 +6006,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6101,7 +6101,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6153,7 +6153,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6276,7 +6276,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6516,7 +6516,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6772,7 +6772,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6832,7 +6832,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6872,7 +6872,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6963,7 +6963,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7152,7 +7152,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7350,7 +7350,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7422,7 +7422,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7523,7 +7523,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7584,7 +7584,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7694,7 +7694,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7808,7 +7808,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7865,7 +7865,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8058,7 +8058,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8161,7 +8161,7 @@ async def delete_value( # 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, @@ -8215,7 +8215,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8277,7 +8277,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8337,7 +8337,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8395,7 +8395,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8516,7 +8516,7 @@ async def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8646,7 +8646,7 @@ async def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8711,7 +8711,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8766,7 +8766,7 @@ async def delete_at_scope( # 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, @@ -8840,7 +8840,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8906,7 +8906,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8984,7 +8984,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9047,7 +9047,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9126,7 +9126,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9192,7 +9192,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9270,7 +9270,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9334,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9415,7 +9415,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9483,7 +9483,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py index 839e50ec5b43..b9a807d5390d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -3046,7 +3046,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3131,7 +3131,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3240,7 +3240,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3282,7 +3282,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3479,7 +3479,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3540,7 +3540,7 @@ def cancel_at_scope( # 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, @@ -3581,7 +3581,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3778,7 +3778,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3845,7 +3845,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3912,7 +3912,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4015,7 +4015,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +4056,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4237,7 +4237,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4295,7 +4295,7 @@ def cancel_at_tenant_scope( # 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, @@ -4335,7 +4335,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4507,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4690,7 +4690,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4754,7 +4754,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4820,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4933,7 +4933,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4975,7 +4975,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5175,7 +5175,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5236,7 +5236,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5277,7 +5277,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5468,7 +5468,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5674,7 +5674,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5741,7 +5741,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5808,7 +5808,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5912,7 +5912,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5954,7 +5954,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6135,7 +6135,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6194,7 +6194,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6235,7 +6235,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6407,7 +6407,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6593,7 +6593,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6658,7 +6658,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6725,7 +6725,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6838,7 +6838,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6885,7 +6885,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7091,7 +7091,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7154,7 +7154,7 @@ def cancel( # 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, @@ -7200,7 +7200,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7398,7 +7398,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7609,7 +7609,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7678,7 +7678,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7753,7 +7753,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7830,7 +7830,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7887,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7936,7 +7936,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8002,7 +8002,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8090,7 +8090,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8166,7 +8166,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8224,7 +8224,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8302,7 +8302,7 @@ def list( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8396,8 +8396,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8414,7 +8414,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8483,7 +8483,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8657,7 +8657,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8857,8 +8857,8 @@ def list( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8875,7 +8875,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8970,7 +8970,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9022,7 +9022,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9145,7 +9145,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9385,7 +9385,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9641,7 +9641,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9701,7 +9701,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9741,7 +9741,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9832,7 +9832,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10021,7 +10021,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10219,7 +10219,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10291,7 +10291,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10392,7 +10392,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10453,7 +10453,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10563,7 +10563,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10677,7 +10677,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10734,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10927,7 +10927,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11030,7 +11030,7 @@ def delete_value( # 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, @@ -11084,7 +11084,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11146,7 +11146,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11206,7 +11206,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11264,7 +11264,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11385,7 +11385,7 @@ def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11515,7 +11515,7 @@ def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11580,7 +11580,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11633,7 +11633,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11707,7 +11707,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11773,7 +11773,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11851,7 +11851,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11914,7 +11914,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11993,7 +11993,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12059,7 +12059,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12137,7 +12137,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12201,7 +12201,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12282,7 +12282,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2021_01_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12350,7 +12350,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py index 1ee5c7dcbce6..344d05be0f7e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -174,7 +174,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,7 +259,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +368,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +410,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +607,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +668,7 @@ async def cancel_at_scope( # 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, @@ -709,7 +709,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,7 +906,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -973,7 +973,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1040,7 +1040,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1143,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,7 +1184,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1365,7 +1365,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1423,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,7 +1463,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1635,7 +1635,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1820,7 +1820,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,7 +1884,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1950,7 +1950,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2063,7 +2063,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2105,7 +2105,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2305,7 +2305,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2366,7 +2366,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2407,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2598,7 +2598,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2804,7 +2804,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2871,7 +2871,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2938,7 +2938,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3042,7 +3042,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3084,7 +3084,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3265,7 +3265,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3324,7 +3324,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3365,7 +3365,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3537,7 +3537,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3723,7 +3723,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3788,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3855,7 +3855,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3968,7 +3968,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4015,7 +4015,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4221,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ async def cancel( # 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, @@ -4330,7 +4330,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4528,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4739,7 +4739,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4808,7 +4808,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4883,7 +4883,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4960,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5020,7 +5020,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5070,7 +5070,7 @@ async def provider_permissions( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ProviderPermissionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5180,7 +5180,7 @@ async def register( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5256,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5338,7 +5338,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> A api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5415,7 +5415,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5473,7 +5473,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5551,7 +5551,7 @@ async def list( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5645,8 +5645,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5663,7 +5663,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5732,7 +5732,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5906,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6091,17 +6091,18 @@ def list( :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following - properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\ - , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ , - ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For - example, to filter by a resource type, use ``$filter=resourceType eq - 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\ - ``substringof(value, property)`` can be used to filter for substrings of the following - currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For - example, to get all resources with 'demo' anywhere in the resource name, use - ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations - can also be combined using ``and``\ /\ ``or`` operators.:code:`
`:code:`
`Note that any - truncated number of results queried via ``$top`` may also not be compatible when using a + properties: ``location``\\ , ``resourceType``\\ , ``name``\\ , ``resourceGroup``\\ , + ``identity``\\ , ``identity/principalId``\\ , ``plan``\\ , ``plan/publisher``\\ , + ``plan/product``\\ , ``plan/name``\\ , ``plan/version``\\ , and + ``plan/promotionCode``.:code:`
`:code:`
`For example, to filter by a resource type, use + ``$filter=resourceType eq 'Microsoft.Network/virtualNetworks'``\\ + :code:`
`:code:`
`:code:`
`\\ ``substringof(value, property)`` can be used to filter + for substrings of the following currently-supported properties: ``name`` and + ``resourceGroup``\\ :code:`
`:code:`
`For example, to get all resources with 'demo' + anywhere in the resource name, use ``$filter=substringof('demo', name)``\\ + :code:`
`:code:`
`Multiple substring operations can also be combined using ``and``\\ /\\ + ``or`` operators.:code:`
`:code:`
`Note that any truncated number of results queried via + ``$top`` may also not be compatible when using a filter.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value, :code:`the @@ -6109,15 +6110,15 @@ def list( additional properties queried via ``$expand`` may also not be compatible when filtering by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will return - all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ , - ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that + all resources with a tag name prefixed by the phrase ``depart`` (i.e.\\ ``department``\\ , + ``departureDate``\\ , ``departureTime``\\ , etc.):code:`
`:code:`
`:code:`
`Note that some properties can be combined when filtering resources, which include the following: - ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and + ``substringof() and/or resourceType``\\ , ``plan and plan/publisher and plan/name``\\ , and ``identity and identity/principalId``. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of recommendations per page if a paged version of this API is being used. Default value is None. @@ -6134,7 +6135,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6229,7 +6230,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6281,7 +6282,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6404,7 +6405,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6644,7 +6645,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6900,7 +6901,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6963,7 +6964,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7003,7 +7004,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7094,7 +7095,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7283,7 +7284,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7481,7 +7482,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7553,7 +7554,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7655,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7715,7 +7716,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7825,7 +7826,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7939,7 +7940,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7996,7 +7997,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8189,7 +8190,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8292,7 +8293,7 @@ async def delete_value( # 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, @@ -8346,7 +8347,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8408,7 +8409,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8468,7 +8469,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8526,7 +8527,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8647,7 +8648,7 @@ async def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8777,7 +8778,7 @@ async def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8842,7 +8843,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8897,7 +8898,7 @@ async def delete_at_scope( # 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, @@ -8971,7 +8972,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9037,7 +9038,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9115,7 +9116,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9178,7 +9179,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9257,7 +9258,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9323,7 +9324,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9401,7 +9402,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9465,7 +9466,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9546,7 +9547,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9614,7 +9615,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py index 583e7f4abc40..6acb0efcb39d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -3072,7 +3072,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3157,7 +3157,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3308,7 +3308,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3505,7 +3505,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3566,7 +3566,7 @@ def cancel_at_scope( # 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, @@ -3607,7 +3607,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3804,7 +3804,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3871,7 +3871,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3938,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4041,7 +4041,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4082,7 +4082,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4263,7 +4263,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4321,7 +4321,7 @@ def cancel_at_tenant_scope( # 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, @@ -4361,7 +4361,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4533,7 +4533,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4716,7 +4716,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4780,7 +4780,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4846,7 +4846,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4959,7 +4959,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5001,7 +5001,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5201,7 +5201,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5262,7 +5262,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5303,7 +5303,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5494,7 +5494,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5700,7 +5700,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5767,7 +5767,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5834,7 +5834,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5938,7 +5938,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5980,7 +5980,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6161,7 +6161,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6220,7 +6220,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6261,7 +6261,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6433,7 +6433,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6619,7 +6619,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6684,7 +6684,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6751,7 +6751,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6864,7 +6864,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6911,7 +6911,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7117,7 +7117,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7180,7 +7180,7 @@ def cancel( # 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, @@ -7226,7 +7226,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7424,7 +7424,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7635,7 +7635,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7704,7 +7704,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.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7779,7 +7779,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7856,7 +7856,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7916,7 +7916,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7966,7 +7966,7 @@ def provider_permissions( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ProviderPermissionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8076,7 +8076,7 @@ def register( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8152,7 +8152,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8234,7 +8234,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8309,7 +8309,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8367,7 +8367,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8445,7 +8445,7 @@ def list( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8539,8 +8539,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8557,7 +8557,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.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8626,7 +8626,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8800,7 +8800,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8985,17 +8985,18 @@ def list( :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following - properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\ - , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ , - ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For - example, to filter by a resource type, use ``$filter=resourceType eq - 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\ - ``substringof(value, property)`` can be used to filter for substrings of the following - currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For - example, to get all resources with 'demo' anywhere in the resource name, use - ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations - can also be combined using ``and``\ /\ ``or`` operators.:code:`
`:code:`
`Note that any - truncated number of results queried via ``$top`` may also not be compatible when using a + properties: ``location``\\ , ``resourceType``\\ , ``name``\\ , ``resourceGroup``\\ , + ``identity``\\ , ``identity/principalId``\\ , ``plan``\\ , ``plan/publisher``\\ , + ``plan/product``\\ , ``plan/name``\\ , ``plan/version``\\ , and + ``plan/promotionCode``.:code:`
`:code:`
`For example, to filter by a resource type, use + ``$filter=resourceType eq 'Microsoft.Network/virtualNetworks'``\\ + :code:`
`:code:`
`:code:`
`\\ ``substringof(value, property)`` can be used to filter + for substrings of the following currently-supported properties: ``name`` and + ``resourceGroup``\\ :code:`
`:code:`
`For example, to get all resources with 'demo' + anywhere in the resource name, use ``$filter=substringof('demo', name)``\\ + :code:`
`:code:`
`Multiple substring operations can also be combined using ``and``\\ /\\ + ``or`` operators.:code:`
`:code:`
`Note that any truncated number of results queried via + ``$top`` may also not be compatible when using a filter.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value, :code:`the @@ -9003,15 +9004,15 @@ def list( additional properties queried via ``$expand`` may also not be compatible when filtering by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will return - all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ , - ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that + all resources with a tag name prefixed by the phrase ``depart`` (i.e.\\ ``department``\\ , + ``departureDate``\\ , ``departureTime``\\ , etc.):code:`
`:code:`
`:code:`
`Note that some properties can be combined when filtering resources, which include the following: - ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and + ``substringof() and/or resourceType``\\ , ``plan and plan/publisher and plan/name``\\ , and ``identity and identity/principalId``. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of recommendations per page if a paged version of this API is being used. Default value is None. @@ -9028,7 +9029,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9123,7 +9124,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9175,7 +9176,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9298,7 +9299,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9538,7 +9539,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9794,7 +9795,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9857,7 +9858,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9897,7 +9898,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9988,7 +9989,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10177,7 +10178,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10375,7 +10376,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10447,7 +10448,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10548,7 +10549,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10609,7 +10610,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10719,7 +10720,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10833,7 +10834,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10890,7 +10891,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11083,7 +11084,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11186,7 +11187,7 @@ def delete_value( # 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, @@ -11240,7 +11241,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11302,7 +11303,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11362,7 +11363,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11420,7 +11421,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11541,7 +11542,7 @@ def create_or_update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11671,7 +11672,7 @@ def update_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11736,7 +11737,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11789,7 +11790,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11863,7 +11864,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11929,7 +11930,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12007,7 +12008,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12070,7 +12071,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12149,7 +12150,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12215,7 +12216,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12293,7 +12294,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12357,7 +12358,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12438,7 +12439,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2021_04_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12506,7 +12507,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py index 3ccc7ba17e77..c7e87243bc92 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +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 @@ -127,6 +127,7 @@ build_tags_delete_value_request, build_tags_get_at_scope_request, build_tags_list_request, + build_tags_operation_result_request, build_tags_update_at_scope_request, ) @@ -174,7 +175,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,7 +260,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +369,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +411,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa async def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +608,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +669,7 @@ async def cancel_at_scope( # 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, @@ -709,7 +710,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements async def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,7 +907,7 @@ async def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -973,7 +974,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1040,7 +1041,7 @@ async def get_next(next_link=None): async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1144,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,7 +1185,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1365,7 +1366,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1424,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,7 +1464,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme async def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1635,7 +1636,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1820,7 +1821,7 @@ async def export_template_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,7 +1885,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1950,7 +1951,7 @@ async def get_next(next_link=None): async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2063,7 +2064,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2105,7 +2106,7 @@ async def check_existence_at_management_group_scope( # pylint: disable=name-too async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2305,7 +2306,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2366,7 +2367,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2408,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2598,7 +2599,7 @@ async def _what_if_at_management_group_scope_initial( # pylint: disable=name-to parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2804,7 +2805,7 @@ async def export_template_at_management_group_scope( # pylint: disable=name-too :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2871,7 +2872,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2938,7 +2939,7 @@ async def get_next(next_link=None): async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3042,7 +3043,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3084,7 +3085,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3265,7 +3266,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3324,7 +3325,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3365,7 +3366,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s async def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3537,7 +3538,7 @@ def get_long_running_output(pipeline_response): async def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3723,7 +3724,7 @@ async def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3789,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3855,7 +3856,7 @@ async def get_next(next_link=None): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3968,7 +3969,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4015,7 +4016,7 @@ async def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,7 +4222,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4285,7 @@ async def cancel( # 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, @@ -4330,7 +4331,7 @@ async def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4529,7 @@ async def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4739,7 +4740,7 @@ async def export_template( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4808,7 +4809,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4883,7 +4884,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4961,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5020,7 +5021,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5070,7 +5071,7 @@ async def provider_permissions( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ProviderPermissionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5180,7 +5181,7 @@ async def register( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5256,7 +5257,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5338,7 +5339,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> A api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5415,7 +5416,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5473,7 +5474,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5551,7 +5552,7 @@ async def list( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5645,8 +5646,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -5663,7 +5664,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5732,7 +5733,7 @@ async def get_next(next_link=None): async def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5907,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6091,17 +6092,18 @@ def list( :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following - properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\ - , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ , - ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For - example, to filter by a resource type, use ``$filter=resourceType eq - 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\ - ``substringof(value, property)`` can be used to filter for substrings of the following - currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For - example, to get all resources with 'demo' anywhere in the resource name, use - ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations - can also be combined using ``and``\ /\ ``or`` operators.:code:`
`:code:`
`Note that any - truncated number of results queried via ``$top`` may also not be compatible when using a + properties: ``location``\\ , ``resourceType``\\ , ``name``\\ , ``resourceGroup``\\ , + ``identity``\\ , ``identity/principalId``\\ , ``plan``\\ , ``plan/publisher``\\ , + ``plan/product``\\ , ``plan/name``\\ , ``plan/version``\\ , and + ``plan/promotionCode``.:code:`
`:code:`
`For example, to filter by a resource type, use + ``$filter=resourceType eq 'Microsoft.Network/virtualNetworks'``\\ + :code:`
`:code:`
`:code:`
`\\ ``substringof(value, property)`` can be used to filter + for substrings of the following currently-supported properties: ``name`` and + ``resourceGroup``\\ :code:`
`:code:`
`For example, to get all resources with 'demo' + anywhere in the resource name, use ``$filter=substringof('demo', name)``\\ + :code:`
`:code:`
`Multiple substring operations can also be combined using ``and``\\ /\\ + ``or`` operators.:code:`
`:code:`
`Note that any truncated number of results queried via + ``$top`` may also not be compatible when using a filter.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value, :code:`the @@ -6109,15 +6111,15 @@ def list( additional properties queried via ``$expand`` may also not be compatible when filtering by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will return - all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ , - ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that + all resources with a tag name prefixed by the phrase ``depart`` (i.e.\\ ``department``\\ , + ``departureDate``\\ , ``departureTime``\\ , etc.):code:`
`:code:`
`:code:`
`Note that some properties can be combined when filtering resources, which include the following: - ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and + ``substringof() and/or resourceType``\\ , ``plan and plan/publisher and plan/name``\\ , and ``identity and identity/principalId``. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of recommendations per page if a paged version of this API is being used. Default value is None. @@ -6134,7 +6136,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6229,7 +6231,7 @@ async def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6281,7 +6283,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6404,7 +6406,7 @@ async def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6644,7 +6646,7 @@ async def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6900,7 +6902,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6963,7 +6965,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7003,7 +7005,7 @@ async def check_existence_by_id(self, resource_id: str, api_version: str, **kwar async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7094,7 +7096,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7283,7 +7285,7 @@ def get_long_running_output(pipeline_response): async def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7481,7 +7483,7 @@ async def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7553,7 +7555,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7654,7 +7656,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7715,7 +7717,7 @@ async def create_or_update( async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7825,7 +7827,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7939,7 +7941,7 @@ async def update( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7996,7 +7998,7 @@ async def update( async def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8189,7 +8191,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8292,7 +8294,7 @@ async def delete_value( # 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, @@ -8346,7 +8348,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8408,7 +8410,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8468,7 +8470,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8526,7 +8528,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8588,10 +8590,107 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) + async def _operation_result_initial(self, **kwargs: Any) -> Optional[_models.TagsResource]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) + cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) + + _request = build_tags_operation_result_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request = _convert_request(_request) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("TagsResource", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_operation_result(self, **kwargs: Any) -> AsyncLROPoller[_models.TagsResource]: + """Gets the tags async operation results. + + This tracks the async operation results emitted from the Tags API. + + :return: An instance of AsyncLROPoller that returns either TagsResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.resources.v2022_09_01.models.TagsResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) + cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._operation_result_initial( + api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("TagsResource", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.TagsResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.TagsResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + async def _create_or_update_at_scope_initial( self, scope: str, parameters: Union[_models.TagsResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.TagsResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8763,7 +8862,7 @@ def get_long_running_output(pipeline_response): async def _update_at_scope_initial( self, scope: str, parameters: Union[_models.TagsPatchResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.TagsResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8962,7 +9061,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9006,7 +9105,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9129,7 +9228,7 @@ async def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9195,7 +9294,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9273,7 +9372,7 @@ async def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9336,7 +9435,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9415,7 +9514,7 @@ async def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9481,7 +9580,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9559,7 +9658,7 @@ async def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9623,7 +9722,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9704,7 +9803,7 @@ async def get( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9772,7 +9871,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py index 42fd394dac1d..35bf568fbc1b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2602,6 +2602,30 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_tags_operation_result_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagsoperationresults") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long scope: str, **kwargs: Any ) -> HttpRequest: @@ -3072,7 +3096,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3157,7 +3181,7 @@ def __init__(self, *args, **kwargs): def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3290,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3308,7 +3332,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A def _create_or_update_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3505,7 +3529,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3566,7 +3590,7 @@ def cancel_at_scope( # 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, @@ -3607,7 +3631,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements def _validate_at_scope_initial( self, scope: str, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3804,7 +3828,7 @@ def export_template_at_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3871,7 +3895,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3962,7 @@ def get_next(next_link=None): def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4041,7 +4065,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4082,7 +4106,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4263,7 +4287,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4321,7 +4345,7 @@ def cancel_at_tenant_scope( # 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, @@ -4361,7 +4385,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements def _validate_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4533,7 +4557,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_tenant_scope_initial( self, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4716,7 +4740,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4780,7 +4804,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4846,7 +4870,7 @@ def get_next(next_link=None): def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4959,7 +4983,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5001,7 +5025,7 @@ def check_existence_at_management_group_scope( # pylint: disable=name-too-long def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5201,7 +5225,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5262,7 +5286,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5303,7 +5327,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5494,7 +5518,7 @@ def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long parameters: Union[_models.ScopedDeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5700,7 +5724,7 @@ def export_template_at_management_group_scope( # pylint: disable=name-too-long :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5767,7 +5791,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5834,7 +5858,7 @@ def get_next(next_link=None): def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-return-statements self, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5938,7 +5962,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5980,7 +6004,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6161,7 +6185,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6220,7 +6244,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6261,7 +6285,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme def _validate_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6433,7 +6457,7 @@ def get_long_running_output(pipeline_response): def _what_if_at_subscription_scope_initial( self, deployment_name: str, parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6619,7 +6643,7 @@ def export_template_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6684,7 +6708,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6751,7 +6775,7 @@ def get_next(next_link=None): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6864,7 +6888,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6911,7 +6935,7 @@ def _create_or_update_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> _models.DeploymentExtended: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7117,7 +7141,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExtended :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7180,7 +7204,7 @@ def cancel( # 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, @@ -7226,7 +7250,7 @@ def _validate_initial( parameters: Union[_models.Deployment, IO[bytes]], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7424,7 +7448,7 @@ def _what_if_initial( parameters: Union[_models.DeploymentWhatIf, IO[bytes]], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7635,7 +7659,7 @@ def export_template( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentExportResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7704,7 +7728,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7779,7 +7803,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TemplateHashResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7856,7 +7880,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7916,7 +7940,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7966,7 +7990,7 @@ def provider_permissions( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ProviderPermissionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8076,7 +8100,7 @@ def register( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8152,7 +8176,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8234,7 +8258,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8309,7 +8333,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8367,7 +8391,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.Provider :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8445,7 +8469,7 @@ def list( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ProviderResourceTypeListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8539,8 +8563,8 @@ def list_by_resource_group( value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. Default value is None. @@ -8557,7 +8581,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8626,7 +8650,7 @@ def get_next(next_link=None): def _move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8800,7 +8824,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _validate_move_resources_initial( # pylint: disable=inconsistent-return-statements self, source_resource_group_name: str, parameters: Union[_models.ResourcesMoveInfo, IO[bytes]], **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8985,17 +9009,18 @@ def list( :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following - properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\ - , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ , - ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For - example, to filter by a resource type, use ``$filter=resourceType eq - 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\ - ``substringof(value, property)`` can be used to filter for substrings of the following - currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For - example, to get all resources with 'demo' anywhere in the resource name, use - ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations - can also be combined using ``and``\ /\ ``or`` operators.:code:`
`:code:`
`Note that any - truncated number of results queried via ``$top`` may also not be compatible when using a + properties: ``location``\\ , ``resourceType``\\ , ``name``\\ , ``resourceGroup``\\ , + ``identity``\\ , ``identity/principalId``\\ , ``plan``\\ , ``plan/publisher``\\ , + ``plan/product``\\ , ``plan/name``\\ , ``plan/version``\\ , and + ``plan/promotionCode``.:code:`
`:code:`
`For example, to filter by a resource type, use + ``$filter=resourceType eq 'Microsoft.Network/virtualNetworks'``\\ + :code:`
`:code:`
`:code:`
`\\ ``substringof(value, property)`` can be used to filter + for substrings of the following currently-supported properties: ``name`` and + ``resourceGroup``\\ :code:`
`:code:`
`For example, to get all resources with 'demo' + anywhere in the resource name, use ``$filter=substringof('demo', name)``\\ + :code:`
`:code:`
`Multiple substring operations can also be combined using ``and``\\ /\\ + ``or`` operators.:code:`
`:code:`
`Note that any truncated number of results queried via + ``$top`` may also not be compatible when using a filter.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value, :code:`the @@ -9003,15 +9028,15 @@ def list( additional properties queried via ``$expand`` may also not be compatible when filtering by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will return - all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ , - ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that + all resources with a tag name prefixed by the phrase ``depart`` (i.e.\\ ``department``\\ , + ``departureDate``\\ , ``departureTime``\\ , etc.):code:`
`:code:`
`:code:`
`Note that some properties can be combined when filtering resources, which include the following: - ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and + ``substringof() and/or resourceType``\\ , ``plan and plan/publisher and plan/name``\\ , and ``identity and identity/principalId``. Default value is None. :type filter: str :param expand: Comma-separated list of additional properties to be included in the response. - Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example, - ``$expand=createdTime,changedTime``. Default value is None. + Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For + example, ``$expand=createdTime,changedTime``. Default value is None. :type expand: str :param top: The number of recommendations per page if a paged version of this API is being used. Default value is None. @@ -9028,7 +9053,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9123,7 +9148,7 @@ def check_existence( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9175,7 +9200,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9298,7 +9323,7 @@ def _create_or_update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9538,7 +9563,7 @@ def _update_initial( parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9794,7 +9819,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9857,7 +9882,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9897,7 +9922,7 @@ def check_existence_by_id(self, resource_id: str, api_version: str, **kwargs: An def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements self, resource_id: str, api_version: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9988,7 +10013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _create_or_update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10177,7 +10202,7 @@ def get_long_running_output(pipeline_response): def _update_by_id_initial( self, resource_id: str, api_version: str, parameters: Union[_models.GenericResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.GenericResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10375,7 +10400,7 @@ def get_by_id(self, resource_id: str, api_version: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.GenericResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10447,7 +10472,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10548,7 +10573,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10609,7 +10634,7 @@ def create_or_update( def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, force_deletion_types: Optional[str] = None, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10719,7 +10744,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10833,7 +10858,7 @@ def update( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.ResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10890,7 +10915,7 @@ def update( def _export_template_initial( self, resource_group_name: str, parameters: Union[_models.ExportTemplateRequest, IO[bytes]], **kwargs: Any ) -> Optional[_models.ResourceGroupExportResult]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11083,7 +11108,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11186,7 +11211,7 @@ def delete_value( # 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, @@ -11240,7 +11265,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagValue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11302,7 +11327,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11362,7 +11387,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11420,7 +11445,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11482,10 +11507,107 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + def _operation_result_initial(self, **kwargs: Any) -> Optional[_models.TagsResource]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) + cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) + + _request = build_tags_operation_result_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request = _convert_request(_request) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("TagsResource", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_operation_result(self, **kwargs: Any) -> LROPoller[_models.TagsResource]: + """Gets the tags async operation results. + + This tracks the async operation results emitted from the Tags API. + + :return: An instance of LROPoller that returns either TagsResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.resources.v2022_09_01.models.TagsResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) + cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._operation_result_initial( + api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("TagsResource", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.TagsResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.TagsResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + def _create_or_update_at_scope_initial( self, scope: str, parameters: Union[_models.TagsResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.TagsResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11657,7 +11779,7 @@ def get_long_running_output(pipeline_response): def _update_at_scope_initial( self, scope: str, parameters: Union[_models.TagsPatchResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.TagsResource]: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11856,7 +11978,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.TagsResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11900,7 +12022,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements self, scope: str, **kwargs: Any ) -> None: - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12023,7 +12145,7 @@ def get_at_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12089,7 +12211,7 @@ def list_at_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12167,7 +12289,7 @@ def get_at_tenant_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12230,7 +12352,7 @@ def list_at_tenant_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12309,7 +12431,7 @@ def get_at_management_group_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12375,7 +12497,7 @@ def list_at_management_group_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12453,7 +12575,7 @@ def get_at_subscription_scope( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12517,7 +12639,7 @@ def list_at_subscription_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12598,7 +12720,7 @@ def get( :rtype: ~azure.mgmt.resource.resources.v2022_09_01.models.DeploymentOperation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12666,7 +12788,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py index a60c7cd3c9a4..574d6ead0ed2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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]] @@ -79,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +186,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +258,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +432,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +522,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +657,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py index 529242af6cb6..0e0be1cc0f4c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -230,7 +235,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,7 +337,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +465,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +673,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +808,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2016_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py index 2cd8e10bed03..66106f70b209 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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]] @@ -79,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +186,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +258,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +432,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +522,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +657,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py index b735e900d277..d0ff529399ff 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -230,7 +235,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,7 +337,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +465,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +673,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +808,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2018_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py index 79225b2b3d52..f8dfa87cd01c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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]] @@ -79,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +186,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +258,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +432,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +522,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +657,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py index 77eb7d4840be..8e90d8cec781 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -230,7 +235,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,7 +337,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +465,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +673,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +808,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2019_06_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py index 38cae25eb0a7..b803d6f1cff6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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]] @@ -79,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +186,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +258,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +432,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +522,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +657,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py index bb9286578bdf..85e8ddc07c78 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -230,7 +235,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,7 +337,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +409,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +465,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +583,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +673,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +808,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py index b8722398b565..00e35791ede3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -39,6 +40,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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 list_locations( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +166,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -217,7 +222,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +340,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +430,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,7 +565,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py index 8c8bac2472d9..572cae6e6c56 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -225,7 +230,7 @@ def list_locations( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -298,7 +303,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -354,7 +359,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -472,7 +477,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -562,7 +567,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-01-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -697,7 +702,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/aio/operations/_operations.py index 8977f7848dd9..d0caecb08ff4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,6 +41,10 @@ ) from .._vendor import SubscriptionClientMixinABC +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]] @@ -79,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,7 +191,7 @@ def list_locations( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,7 +264,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,7 +320,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -433,7 +438,7 @@ async def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,7 +528,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -658,7 +663,7 @@ async def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/operations/_operations.py index 6ea32774a5cf..789a680c8cc6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_12_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2022_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,10 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -234,7 +239,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +346,7 @@ def list_locations( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -414,7 +419,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.Subscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +475,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +593,7 @@ def check_zone_peers( :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.CheckZonePeersResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,7 +683,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-12-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +818,7 @@ def check_resource_name( :rtype: ~azure.mgmt.resource.subscriptions.v2022_12_01.models.CheckResourceNameResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py index 37976a135c22..bfcbb7390aba 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,6 +44,10 @@ build_template_specs_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]] @@ -144,7 +149,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,7 +292,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +376,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -434,7 +439,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, @@ -499,7 +504,7 @@ def list_by_subscription( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -592,7 +597,7 @@ def list_by_resource_group( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -765,7 +770,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -919,7 +924,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +1003,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1068,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, @@ -1130,7 +1135,7 @@ def list( ) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py index 3262d5b8904c..e1ed6d188bef 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -566,7 +571,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +714,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +798,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,7 +861,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, @@ -921,7 +926,7 @@ def list_by_subscription( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1019,7 @@ def list_by_resource_group( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1187,7 +1192,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1341,7 +1346,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1425,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2019_06_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1490,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, @@ -1552,7 +1557,7 @@ def list( ) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py index 2b46c08685d2..bf427199c1f0 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,6 +44,10 @@ build_template_specs_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]] @@ -144,7 +149,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,7 +292,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +376,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -434,7 +439,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, @@ -499,7 +504,7 @@ def list_by_subscription( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -592,7 +597,7 @@ def list_by_resource_group( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -765,7 +770,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -919,7 +924,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +1003,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1068,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, @@ -1130,7 +1135,7 @@ def list( ) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py index bbc965282266..6a3eb6850b32 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_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, Optional, TypeVar, Union, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -566,7 +571,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +714,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +798,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,7 +861,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, @@ -921,7 +926,7 @@ def list_by_subscription( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1019,7 @@ def list_by_resource_group( ) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1187,7 +1192,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1341,7 +1346,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1425,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_03_01_preview.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1490,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, @@ -1552,7 +1557,7 @@ def list( ) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py index 04fcac3c61f0..5c0a2f2923a8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,6 +44,10 @@ build_template_specs_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]] @@ -144,7 +149,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -284,7 +289,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +371,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +432,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, @@ -488,7 +493,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -579,7 +584,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,7 +757,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -904,7 +909,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -981,7 +986,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1044,7 +1049,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, @@ -1107,7 +1112,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py index 89016523bcc5..360dfb8fe236 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -566,7 +571,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -706,7 +711,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,7 +793,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +854,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, @@ -910,7 +915,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1001,7 +1006,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1179,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1326,7 +1331,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1403,7 +1408,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2021_05_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,7 +1471,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, @@ -1529,7 +1534,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-05-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py index 2960d05ed5c3..e5754a47ce68 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py index b6402babafcf..5a6984f14635 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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, overload +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -47,6 +48,10 @@ build_template_specs_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]] @@ -148,7 +153,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +293,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +375,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -431,7 +436,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, @@ -492,7 +497,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +588,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,7 +672,7 @@ async def get_built_in( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -731,7 +736,7 @@ def list_built_ins( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -902,7 +907,7 @@ async def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1054,7 +1059,7 @@ async def update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1131,7 +1136,7 @@ async def get( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1194,7 +1199,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, @@ -1257,7 +1262,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1339,7 +1344,7 @@ def list_built_ins(self, template_spec_name: str, **kwargs: Any) -> AsyncIterabl api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1421,7 @@ async def get_built_in( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py index a222a26d8ca1..fdf32f09df98 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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, overload +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,6 +31,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]] @@ -686,7 +691,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -826,7 +831,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +913,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -969,7 +974,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, @@ -1030,7 +1035,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1121,7 +1126,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1205,7 +1210,7 @@ def get_built_in( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpec :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,7 +1274,7 @@ def list_built_ins( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1445,7 @@ def create_or_update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1592,7 +1597,7 @@ def update( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1674,7 @@ def get( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1732,7 +1737,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, @@ -1795,7 +1800,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1877,7 +1882,7 @@ def list_built_ins(self, template_spec_name: str, **kwargs: Any) -> Iterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1954,7 +1959,7 @@ def get_built_in( :rtype: ~azure.mgmt.resource.templatespecs.v2022_02_01.models.TemplateSpecVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/resources/azure-mgmt-resource/generated_samples/resources/get_tags_operation_results.py b/sdk/resources/azure-mgmt-resource/generated_samples/resources/get_tags_operation_results.py new file mode 100644 index 000000000000..b5209e3e80ea --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/generated_samples/resources/get_tags_operation_results.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.resource import ResourceManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-resource +# USAGE + python get_tags_operation_results.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ResourceManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.tags.begin_operation_result().result() + print(response) + + +# x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/GetTagsOperationResults.json +if __name__ == "__main__": + main()