diff --git a/sdk/appservice/azure-mgmt-web/_meta.json b/sdk/appservice/azure-mgmt-web/_meta.json index fba4aa56e66b..2a2bc58de696 100644 --- a/sdk/appservice/azure-mgmt-web/_meta.json +++ b/sdk/appservice/azure-mgmt-web/_meta.json @@ -1,12 +1,12 @@ { - "commit": "ff7b8e12e78b352561e2e470dd045be310a313fa", + "commit": "405389ea52adf121a8c350844785d595fb0370d7", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.26.4", + "@autorest/python@6.27.4", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/web/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/web/resource-manager/readme.md --generate-sample=True --generate-test=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.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/web/resource-manager/readme.md", "package-2023-01": "fatal: invalid object name 'from'. from: WebApps.json", "package-2022-09": "fatal: invalid object name 'from'. from: WebApps.json", diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py index c2f92f94f4d8..41da083b833b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py @@ -7,12 +7,10 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient - -__all__ = ["WebSiteManagementClient"] +__all__ = ['WebSiteManagementClient'] try: from ._patch import patch_sdk # type: ignore - patch_sdk() except ImportError: pass diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py index 6baf828723b0..7884fff20c78 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py @@ -19,7 +19,6 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential - class WebSiteManagementClientConfiguration: """Configuration for WebSiteManagementClient. @@ -32,7 +31,12 @@ class WebSiteManagementClientConfiguration: :type subscription_id: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any): + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ): if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -40,22 +44,23 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) - kwargs.setdefault("sdk_moniker", "azure-mgmt-web/{}".format(VERSION)) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-web/{}'.format(VERSION)) self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) - def _configure(self, **kwargs: Any): - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") + def _configure( + self, + **kwargs: Any + ): + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = ARMChallengeAuthenticationPolicy( - self.credential, *self.credential_scopes, **kwargs - ) + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py index 599f237da703..4d1d4a53a1db 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py @@ -21,7 +21,7 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object class WebSiteManagementClientOperationsMixin(object): @@ -56,16 +56,16 @@ def check_name_availability( :rtype: ~azure.mgmt.web.v2024_04_01.models.ResourceNameAvailability :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("check_name_availability") - if api_version == "2016-03-01": + api_version = self._get_api_version('check_name_availability') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'check_name_availability'".format(api_version)) @@ -78,7 +78,10 @@ def check_name_availability( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.check_name_availability(name, type, is_fqdn, environment_id, **kwargs) - def get_publishing_user(self, **kwargs: Any) -> _models.User: + def get_publishing_user( + self, + **kwargs: Any + ) -> _models.User: """Gets publishing user. Description for Gets publishing user. @@ -87,16 +90,16 @@ def get_publishing_user(self, **kwargs: Any) -> _models.User: :rtype: ~azure.mgmt.web.v2024_04_01.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_publishing_user") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_publishing_user') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_publishing_user'".format(api_version)) @@ -109,7 +112,11 @@ def get_publishing_user(self, **kwargs: Any) -> _models.User: mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.get_publishing_user(**kwargs) - def get_source_control(self, source_control_type: str, **kwargs: Any) -> _models.SourceControl: + def get_source_control( + self, + source_control_type: str, + **kwargs: Any + ) -> _models.SourceControl: """Gets source control token. Description for Gets source control token. @@ -120,16 +127,16 @@ def get_source_control(self, source_control_type: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.web.v2024_04_01.models.SourceControl :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_source_control") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_source_control') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_source_control'".format(api_version)) @@ -142,7 +149,10 @@ def get_source_control(self, source_control_type: str, **kwargs: Any) -> _models mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.get_source_control(source_control_type, **kwargs) - def get_subscription_deployment_locations(self, **kwargs: Any) -> _models.DeploymentLocations: + def get_subscription_deployment_locations( + self, + **kwargs: Any + ) -> _models.DeploymentLocations: """Gets list of available geo regions plus ministamps. Description for Gets list of available geo regions plus ministamps. @@ -151,21 +161,19 @@ def get_subscription_deployment_locations(self, **kwargs: Any) -> _models.Deploy :rtype: ~azure.mgmt.web.v2024_04_01.models.DeploymentLocations :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_subscription_deployment_locations") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_subscription_deployment_locations') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version) - ) + raise ValueError("API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -175,7 +183,10 @@ def get_subscription_deployment_locations(self, **kwargs: Any) -> _models.Deploy mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.get_subscription_deployment_locations(**kwargs) - def list_ase_regions(self, **kwargs: Any) -> Iterable["_models.AseRegion"]: + def list_ase_regions( + self, + **kwargs: Any + ) -> Iterable["_models.AseRegion"]: """Get a list of available ASE regions and its supported Skus. Description for get a list of available ASE regions and its supported Skus. @@ -184,10 +195,10 @@ def list_ase_regions(self, **kwargs: Any) -> Iterable["_models.AseRegion"]: :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.AseRegion] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_ase_regions") - if api_version == "2023-01-01": + api_version = self._get_api_version('list_ase_regions') + if api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_ase_regions'".format(api_version)) @@ -201,7 +212,10 @@ def list_ase_regions(self, **kwargs: Any) -> Iterable["_models.AseRegion"]: return mixin_instance.list_ase_regions(**kwargs) def list_billing_meters( - self, billing_location: Optional[str] = None, os_type: Optional[str] = None, **kwargs: Any + self, + billing_location: Optional[str] = None, + os_type: Optional[str] = None, + **kwargs: Any ) -> Iterable["_models.BillingMeter"]: """Gets a list of meters for a given location. @@ -215,14 +229,14 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.BillingMeter] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_billing_meters") - if api_version == "2018-02-01": + api_version = self._get_api_version('list_billing_meters') + if api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_billing_meters'".format(api_version)) @@ -236,7 +250,9 @@ def list_billing_meters( return mixin_instance.list_billing_meters(billing_location, os_type, **kwargs) def list_custom_host_name_sites( - self, hostname: Optional[str] = None, **kwargs: Any + self, + hostname: Optional[str] = None, + **kwargs: Any ) -> Iterable["_models.CustomHostnameSites"]: """Get custom hostnames under this subscription. @@ -248,12 +264,12 @@ def list_custom_host_name_sites( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.CustomHostnameSites] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_custom_host_name_sites") - if api_version == "2022-09-01": + api_version = self._get_api_version('list_custom_host_name_sites') + if api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_custom_host_name_sites'".format(api_version)) @@ -296,16 +312,16 @@ def list_geo_regions( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.GeoRegion] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_geo_regions") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_geo_regions') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_geo_regions'".format(api_version)) @@ -316,11 +332,12 @@ def list_geo_regions( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.list_geo_regions( - sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, **kwargs - ) + return mixin_instance.list_geo_regions(sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, **kwargs) - def list_premier_add_on_offers(self, **kwargs: Any) -> Iterable["_models.PremierAddOnOffer"]: + def list_premier_add_on_offers( + self, + **kwargs: Any + ) -> Iterable["_models.PremierAddOnOffer"]: """List all premier add-on offers. Description for List all premier add-on offers. @@ -329,16 +346,16 @@ def list_premier_add_on_offers(self, **kwargs: Any) -> Iterable["_models.Premier :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.PremierAddOnOffer] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_premier_add_on_offers") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_premier_add_on_offers') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_premier_add_on_offers'".format(api_version)) @@ -352,7 +369,9 @@ def list_premier_add_on_offers(self, **kwargs: Any) -> Iterable["_models.Premier return mixin_instance.list_premier_add_on_offers(**kwargs) def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-long - self, name_identifier: Union[_models.NameIdentifier, IO[bytes]], **kwargs: Any + self, + name_identifier: Union[_models.NameIdentifier, IO[bytes]], + **kwargs: Any ) -> Iterable["_models.Identifier"]: """List all apps that are assigned to a hostname. @@ -365,23 +384,19 @@ def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-lon :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.Identifier] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_site_identifiers_assigned_to_host_name") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -391,7 +406,10 @@ def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-lon mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.list_site_identifiers_assigned_to_host_name(name_identifier, **kwargs) - def list_skus(self, **kwargs: Any) -> _models.SkuInfos: + def list_skus( + self, + **kwargs: Any + ) -> _models.SkuInfos: """List all SKUs. Description for List all SKUs. @@ -400,16 +418,16 @@ def list_skus(self, **kwargs: Any) -> _models.SkuInfos: :rtype: ~azure.mgmt.web.v2024_04_01.models.SkuInfos :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_skus") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_skus') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_skus'".format(api_version)) @@ -422,7 +440,10 @@ def list_skus(self, **kwargs: Any) -> _models.SkuInfos: mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.list_skus(**kwargs) - def list_source_controls(self, **kwargs: Any) -> Iterable["_models.SourceControl"]: + def list_source_controls( + self, + **kwargs: Any + ) -> Iterable["_models.SourceControl"]: """Gets the source controls available for Azure websites. Description for Gets the source controls available for Azure websites. @@ -431,16 +452,16 @@ def list_source_controls(self, **kwargs: Any) -> Iterable["_models.SourceControl :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.SourceControl] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_source_controls") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_source_controls') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_source_controls'".format(api_version)) @@ -473,16 +494,16 @@ def move( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("move") - if api_version == "2016-03-01": + api_version = self._get_api_version('move') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'move'".format(api_version)) @@ -495,7 +516,11 @@ def move( # pylint: disable=inconsistent-return-statements mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.move(resource_group_name, move_resource_envelope, **kwargs) - def update_publishing_user(self, user_details: Union[_models.User, IO[bytes]], **kwargs: Any) -> _models.User: + def update_publishing_user( + self, + user_details: Union[_models.User, IO[bytes]], + **kwargs: Any + ) -> _models.User: """Updates publishing user. Description for Updates publishing user. @@ -507,16 +532,16 @@ def update_publishing_user(self, user_details: Union[_models.User, IO[bytes]], * :rtype: ~azure.mgmt.web.v2024_04_01.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("update_publishing_user") - if api_version == "2016-03-01": + api_version = self._get_api_version('update_publishing_user') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'update_publishing_user'".format(api_version)) @@ -530,7 +555,10 @@ def update_publishing_user(self, user_details: Union[_models.User, IO[bytes]], * return mixin_instance.update_publishing_user(user_details, **kwargs) def update_source_control( - self, source_control_type: str, request_message: Union[_models.SourceControl, IO[bytes]], **kwargs: Any + self, + source_control_type: str, + request_message: Union[_models.SourceControl, IO[bytes]], + **kwargs: Any ) -> _models.SourceControl: """Updates source control token. @@ -545,16 +573,16 @@ def update_source_control( :rtype: ~azure.mgmt.web.v2024_04_01.models.SourceControl :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("update_source_control") - if api_version == "2016-03-01": + api_version = self._get_api_version('update_source_control') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'update_source_control'".format(api_version)) @@ -568,7 +596,10 @@ def update_source_control( return mixin_instance.update_source_control(source_control_type, request_message, **kwargs) def validate( - self, resource_group_name: str, validate_request: Union[_models.ValidateRequest, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + validate_request: Union[_models.ValidateRequest, IO[bytes]], + **kwargs: Any ) -> _models.ValidateResponse: """Validate if a resource can be created. @@ -583,16 +614,16 @@ def validate( :rtype: ~azure.mgmt.web.v2024_04_01.models.ValidateResponse :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate") - if api_version == "2016-03-01": + api_version = self._get_api_version('validate') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate'".format(api_version)) @@ -625,8 +656,8 @@ def validate_container_settings( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate_container_settings") - if api_version == "2018-02-01": + api_version = self._get_api_version('validate_container_settings') + if api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate_container_settings'".format(api_version)) @@ -637,9 +668,7 @@ def validate_container_settings( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.validate_container_settings( - resource_group_name, validate_container_settings_request, **kwargs - ) + return mixin_instance.validate_container_settings(resource_group_name, validate_container_settings_request, **kwargs) def validate_move( # pylint: disable=inconsistent-return-statements self, @@ -661,16 +690,16 @@ def validate_move( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate_move") - if api_version == "2016-03-01": + api_version = self._get_api_version('validate_move') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate_move'".format(api_version)) @@ -684,7 +713,9 @@ def validate_move( # pylint: disable=inconsistent-return-statements return mixin_instance.validate_move(resource_group_name, move_resource_envelope, **kwargs) def verify_hosting_environment_vnet( - self, parameters: Union[_models.VnetParameters, IO[bytes]], **kwargs: Any + self, + parameters: Union[_models.VnetParameters, IO[bytes]], + **kwargs: Any ) -> _models.VnetValidationFailureDetails: """Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. @@ -699,21 +730,19 @@ def verify_hosting_environment_vnet( :rtype: ~azure.mgmt.web.v2024_04_01.models.VnetValidationFailureDetails :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("verify_hosting_environment_vnet") - if api_version == "2016-03-01": + api_version = self._get_api_version('verify_hosting_environment_vnet') + if api_version == '2016-03-01': from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version) - ) + raise ValueError("API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py index dc8692e6ec0f..a94487cbf17a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py @@ -309,7 +309,7 @@ def _create_xml_node(tag, prefix=None, ns=None): return ET.Element(tag) -class Model(object): +class Model: """Mixin for all client request body/response body models to support serialization and deserialization. """ @@ -562,7 +562,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -1440,7 +1440,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1682,17 +1682,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py index a92777697e87..6c6b2e567186 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py @@ -26,7 +26,6 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential - class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -34,7 +33,6 @@ def __init__(self, *args, **kwargs): """ pass - class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """WebSite Management Client. @@ -59,30 +57,30 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = "2024-04-01" + DEFAULT_API_VERSION = '2024-04-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" - LATEST_PROFILE = ProfileDefinition( - { - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - "billing_meters": "2016-03-01", - "validate_container_settings": "2018-02-01", - } - }, - _PROFILE_TAG + " latest", + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'billing_meters': '2016-03-01', + 'container_apps': '2023-01-01', + 'container_apps_revisions': '2023-01-01', + 'validate_container_settings': '2018-02-01', + }}, + _PROFILE_TAG + " latest" ) def __init__( self, credential: "TokenCredential", subscription_id: str, - api_version: Optional[str] = None, + api_version: Optional[str]=None, base_url: str = "https://management.azure.com", - profile: KnownProfiles = KnownProfiles.default, + profile: KnownProfiles=KnownProfiles.default, **kwargs: Any ): if api_version: - kwargs.setdefault("api_version", api_version) + kwargs.setdefault('api_version', api_version) self._config = WebSiteManagementClientConfiguration(credential, subscription_id, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: @@ -102,8 +100,11 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) - super(WebSiteManagementClient, self).__init__(api_version=api_version, profile=profile) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + super(WebSiteManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) @classmethod def _models_dict(cls, api_version): @@ -113,31 +114,26 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2016-03-01: :mod:`v2016_03_01.models` - * 2018-02-01: :mod:`v2018_02_01.models` - * 2022-09-01: :mod:`v2022_09_01.models` - * 2023-01-01: :mod:`v2023_01_01.models` - * 2024-04-01: :mod:`v2024_04_01.models` + * 2016-03-01: :mod:`v2016_03_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2022-09-01: :mod:`v2022_09_01.models` + * 2023-01-01: :mod:`v2023_01_01.models` + * 2024-04-01: :mod:`v2024_04_01.models` """ - if api_version == "2016-03-01": + if api_version == '2016-03-01': from .v2016_03_01 import models - return models - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01 import models - return models - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01 import models - return models - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01 import models - return models - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01 import models - return models raise ValueError("API version {} is not available".format(api_version)) @@ -145,893 +141,671 @@ def models(cls, api_version=DEFAULT_API_VERSION): def app_service_certificate_orders(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` - * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2024-04-01: :class:`AppServiceCertificateOrdersOperations` + * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` + * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` + * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` + * 2024-04-01: :class:`AppServiceCertificateOrdersOperations` """ - api_version = self._get_api_version("app_service_certificate_orders") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_certificate_orders') + if api_version == '2018-02-01': from .v2018_02_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import AppServiceCertificateOrdersOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'app_service_certificate_orders'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'app_service_certificate_orders'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def app_service_environments(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServiceEnvironmentsOperations` - * 2022-09-01: :class:`AppServiceEnvironmentsOperations` - * 2023-01-01: :class:`AppServiceEnvironmentsOperations` - * 2024-04-01: :class:`AppServiceEnvironmentsOperations` + * 2018-02-01: :class:`AppServiceEnvironmentsOperations` + * 2022-09-01: :class:`AppServiceEnvironmentsOperations` + * 2023-01-01: :class:`AppServiceEnvironmentsOperations` + * 2024-04-01: :class:`AppServiceEnvironmentsOperations` """ - api_version = self._get_api_version("app_service_environments") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_environments') + if api_version == '2018-02-01': from .v2018_02_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import AppServiceEnvironmentsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'app_service_environments'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'app_service_environments'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def app_service_plans(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServicePlansOperations` - * 2022-09-01: :class:`AppServicePlansOperations` - * 2023-01-01: :class:`AppServicePlansOperations` - * 2024-04-01: :class:`AppServicePlansOperations` + * 2018-02-01: :class:`AppServicePlansOperations` + * 2022-09-01: :class:`AppServicePlansOperations` + * 2023-01-01: :class:`AppServicePlansOperations` + * 2024-04-01: :class:`AppServicePlansOperations` """ - api_version = self._get_api_version("app_service_plans") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_plans') + if api_version == '2018-02-01': from .v2018_02_01.operations import AppServicePlansOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import AppServicePlansOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import AppServicePlansOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import AppServicePlansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'app_service_plans'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def billing_meters(self): """Instance depends on the API version: - * 2016-03-01: :class:`BillingMetersOperations` + * 2016-03-01: :class:`BillingMetersOperations` """ - api_version = self._get_api_version("billing_meters") - if api_version == "2016-03-01": + api_version = self._get_api_version('billing_meters') + if api_version == '2016-03-01': from .v2016_03_01.operations import BillingMetersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'billing_meters'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificate_orders_diagnostics(self): """Instance depends on the API version: - * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2024-04-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2024-04-01: :class:`CertificateOrdersDiagnosticsOperations` """ - api_version = self._get_api_version("certificate_orders_diagnostics") - if api_version == "2022-09-01": + api_version = self._get_api_version('certificate_orders_diagnostics') + if api_version == '2022-09-01': from .v2022_09_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificate_registration_provider(self): """Instance depends on the API version: - * 2018-02-01: :class:`CertificateRegistrationProviderOperations` - * 2022-09-01: :class:`CertificateRegistrationProviderOperations` - * 2023-01-01: :class:`CertificateRegistrationProviderOperations` - * 2024-04-01: :class:`CertificateRegistrationProviderOperations` + * 2018-02-01: :class:`CertificateRegistrationProviderOperations` + * 2022-09-01: :class:`CertificateRegistrationProviderOperations` + * 2023-01-01: :class:`CertificateRegistrationProviderOperations` + * 2024-04-01: :class:`CertificateRegistrationProviderOperations` """ - api_version = self._get_api_version("certificate_registration_provider") - if api_version == "2018-02-01": + api_version = self._get_api_version('certificate_registration_provider') + if api_version == '2018-02-01': from .v2018_02_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import CertificateRegistrationProviderOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'certificate_registration_provider'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'certificate_registration_provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificates(self): """Instance depends on the API version: - * 2016-03-01: :class:`CertificatesOperations` - * 2018-02-01: :class:`CertificatesOperations` - * 2022-09-01: :class:`CertificatesOperations` - * 2023-01-01: :class:`CertificatesOperations` - * 2024-04-01: :class:`CertificatesOperations` + * 2016-03-01: :class:`CertificatesOperations` + * 2018-02-01: :class:`CertificatesOperations` + * 2022-09-01: :class:`CertificatesOperations` + * 2023-01-01: :class:`CertificatesOperations` + * 2024-04-01: :class:`CertificatesOperations` """ - api_version = self._get_api_version("certificates") - if api_version == "2016-03-01": + api_version = self._get_api_version('certificates') + if api_version == '2016-03-01': from .v2016_03_01.operations import CertificatesOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import CertificatesOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import CertificatesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import CertificatesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def container_apps(self): """Instance depends on the API version: - * 2022-09-01: :class:`ContainerAppsOperations` - * 2023-01-01: :class:`ContainerAppsOperations` - * 2024-04-01: :class:`ContainerAppsOperations` + * 2022-09-01: :class:`ContainerAppsOperations` + * 2023-01-01: :class:`ContainerAppsOperations` """ - api_version = self._get_api_version("container_apps") - if api_version == "2022-09-01": + api_version = self._get_api_version('container_apps') + if api_version == '2022-09-01': from .v2022_09_01.operations import ContainerAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import ContainerAppsOperations as OperationClass - elif api_version == "2024-04-01": - from .v2024_04_01.operations import ContainerAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'container_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def container_apps_revisions(self): """Instance depends on the API version: - * 2022-09-01: :class:`ContainerAppsRevisionsOperations` - * 2023-01-01: :class:`ContainerAppsRevisionsOperations` - * 2024-04-01: :class:`ContainerAppsRevisionsOperations` + * 2022-09-01: :class:`ContainerAppsRevisionsOperations` + * 2023-01-01: :class:`ContainerAppsRevisionsOperations` """ - api_version = self._get_api_version("container_apps_revisions") - if api_version == "2022-09-01": + api_version = self._get_api_version('container_apps_revisions') + if api_version == '2022-09-01': from .v2022_09_01.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == "2024-04-01": - from .v2024_04_01.operations import ContainerAppsRevisionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'container_apps_revisions'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'container_apps_revisions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def deleted_web_apps(self): """Instance depends on the API version: - * 2016-03-01: :class:`DeletedWebAppsOperations` - * 2018-02-01: :class:`DeletedWebAppsOperations` - * 2022-09-01: :class:`DeletedWebAppsOperations` - * 2023-01-01: :class:`DeletedWebAppsOperations` - * 2024-04-01: :class:`DeletedWebAppsOperations` + * 2016-03-01: :class:`DeletedWebAppsOperations` + * 2018-02-01: :class:`DeletedWebAppsOperations` + * 2022-09-01: :class:`DeletedWebAppsOperations` + * 2023-01-01: :class:`DeletedWebAppsOperations` + * 2024-04-01: :class:`DeletedWebAppsOperations` """ - api_version = self._get_api_version("deleted_web_apps") - if api_version == "2016-03-01": + api_version = self._get_api_version('deleted_web_apps') + if api_version == '2016-03-01': from .v2016_03_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import DeletedWebAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deleted_web_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def diagnostics(self): """Instance depends on the API version: - * 2016-03-01: :class:`DiagnosticsOperations` - * 2018-02-01: :class:`DiagnosticsOperations` - * 2022-09-01: :class:`DiagnosticsOperations` - * 2023-01-01: :class:`DiagnosticsOperations` - * 2024-04-01: :class:`DiagnosticsOperations` + * 2016-03-01: :class:`DiagnosticsOperations` + * 2018-02-01: :class:`DiagnosticsOperations` + * 2022-09-01: :class:`DiagnosticsOperations` + * 2023-01-01: :class:`DiagnosticsOperations` + * 2024-04-01: :class:`DiagnosticsOperations` """ - api_version = self._get_api_version("diagnostics") - if api_version == "2016-03-01": + api_version = self._get_api_version('diagnostics') + if api_version == '2016-03-01': from .v2016_03_01.operations import DiagnosticsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import DiagnosticsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import DiagnosticsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import DiagnosticsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import DiagnosticsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostics'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def domain_registration_provider(self): """Instance depends on the API version: - * 2018-02-01: :class:`DomainRegistrationProviderOperations` - * 2022-09-01: :class:`DomainRegistrationProviderOperations` - * 2023-01-01: :class:`DomainRegistrationProviderOperations` - * 2024-04-01: :class:`DomainRegistrationProviderOperations` + * 2018-02-01: :class:`DomainRegistrationProviderOperations` + * 2022-09-01: :class:`DomainRegistrationProviderOperations` + * 2023-01-01: :class:`DomainRegistrationProviderOperations` + * 2024-04-01: :class:`DomainRegistrationProviderOperations` """ - api_version = self._get_api_version("domain_registration_provider") - if api_version == "2018-02-01": + api_version = self._get_api_version('domain_registration_provider') + if api_version == '2018-02-01': from .v2018_02_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import DomainRegistrationProviderOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'domain_registration_provider'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'domain_registration_provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def domains(self): """Instance depends on the API version: - * 2018-02-01: :class:`DomainsOperations` - * 2022-09-01: :class:`DomainsOperations` - * 2023-01-01: :class:`DomainsOperations` - * 2024-04-01: :class:`DomainsOperations` + * 2018-02-01: :class:`DomainsOperations` + * 2022-09-01: :class:`DomainsOperations` + * 2023-01-01: :class:`DomainsOperations` + * 2024-04-01: :class:`DomainsOperations` """ - api_version = self._get_api_version("domains") - if api_version == "2018-02-01": + api_version = self._get_api_version('domains') + if api_version == '2018-02-01': from .v2018_02_01.operations import DomainsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import DomainsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import DomainsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import DomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'domains'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def get_usages_in_location(self): """Instance depends on the API version: - * 2023-01-01: :class:`GetUsagesInLocationOperations` - * 2024-04-01: :class:`GetUsagesInLocationOperations` + * 2023-01-01: :class:`GetUsagesInLocationOperations` + * 2024-04-01: :class:`GetUsagesInLocationOperations` """ - api_version = self._get_api_version("get_usages_in_location") - if api_version == "2023-01-01": + api_version = self._get_api_version('get_usages_in_location') + if api_version == '2023-01-01': from .v2023_01_01.operations import GetUsagesInLocationOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import GetUsagesInLocationOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'get_usages_in_location'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'get_usages_in_location'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def global_operations(self): """Instance depends on the API version: - * 2022-09-01: :class:`GlobalOperations` - * 2023-01-01: :class:`GlobalOperations` - * 2024-04-01: :class:`GlobalOperations` + * 2022-09-01: :class:`GlobalOperations` + * 2023-01-01: :class:`GlobalOperations` + * 2024-04-01: :class:`GlobalOperations` """ - api_version = self._get_api_version("global_operations") - if api_version == "2022-09-01": + api_version = self._get_api_version('global_operations') + if api_version == '2022-09-01': from .v2022_09_01.operations import GlobalOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import GlobalOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import GlobalOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'global_operations'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def kube_environments(self): """Instance depends on the API version: - * 2022-09-01: :class:`KubeEnvironmentsOperations` - * 2023-01-01: :class:`KubeEnvironmentsOperations` - * 2024-04-01: :class:`KubeEnvironmentsOperations` + * 2022-09-01: :class:`KubeEnvironmentsOperations` + * 2023-01-01: :class:`KubeEnvironmentsOperations` + * 2024-04-01: :class:`KubeEnvironmentsOperations` """ - api_version = self._get_api_version("kube_environments") - if api_version == "2022-09-01": + api_version = self._get_api_version('kube_environments') + if api_version == '2022-09-01': from .v2022_09_01.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import KubeEnvironmentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'kube_environments'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def provider(self): """Instance depends on the API version: - * 2016-03-01: :class:`ProviderOperations` - * 2018-02-01: :class:`ProviderOperations` - * 2022-09-01: :class:`ProviderOperations` - * 2023-01-01: :class:`ProviderOperations` - * 2024-04-01: :class:`ProviderOperations` + * 2016-03-01: :class:`ProviderOperations` + * 2018-02-01: :class:`ProviderOperations` + * 2022-09-01: :class:`ProviderOperations` + * 2023-01-01: :class:`ProviderOperations` + * 2024-04-01: :class:`ProviderOperations` """ - api_version = self._get_api_version("provider") - if api_version == "2016-03-01": + api_version = self._get_api_version('provider') + if api_version == '2016-03-01': from .v2016_03_01.operations import ProviderOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import ProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import ProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import ProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import ProviderOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def recommendations(self): """Instance depends on the API version: - * 2016-03-01: :class:`RecommendationsOperations` - * 2018-02-01: :class:`RecommendationsOperations` - * 2022-09-01: :class:`RecommendationsOperations` - * 2023-01-01: :class:`RecommendationsOperations` - * 2024-04-01: :class:`RecommendationsOperations` + * 2016-03-01: :class:`RecommendationsOperations` + * 2018-02-01: :class:`RecommendationsOperations` + * 2022-09-01: :class:`RecommendationsOperations` + * 2023-01-01: :class:`RecommendationsOperations` + * 2024-04-01: :class:`RecommendationsOperations` """ - api_version = self._get_api_version("recommendations") - if api_version == "2016-03-01": + api_version = self._get_api_version('recommendations') + if api_version == '2016-03-01': from .v2016_03_01.operations import RecommendationsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import RecommendationsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import RecommendationsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import RecommendationsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import RecommendationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'recommendations'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def resource_health_metadata(self): """Instance depends on the API version: - * 2016-03-01: :class:`ResourceHealthMetadataOperations` - * 2018-02-01: :class:`ResourceHealthMetadataOperations` - * 2022-09-01: :class:`ResourceHealthMetadataOperations` - * 2023-01-01: :class:`ResourceHealthMetadataOperations` - * 2024-04-01: :class:`ResourceHealthMetadataOperations` + * 2016-03-01: :class:`ResourceHealthMetadataOperations` + * 2018-02-01: :class:`ResourceHealthMetadataOperations` + * 2022-09-01: :class:`ResourceHealthMetadataOperations` + * 2023-01-01: :class:`ResourceHealthMetadataOperations` + * 2024-04-01: :class:`ResourceHealthMetadataOperations` """ - api_version = self._get_api_version("resource_health_metadata") - if api_version == "2016-03-01": + api_version = self._get_api_version('resource_health_metadata') + if api_version == '2016-03-01': from .v2016_03_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from .v2018_02_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import ResourceHealthMetadataOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'resource_health_metadata'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'resource_health_metadata'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def static_sites(self): """Instance depends on the API version: - * 2022-09-01: :class:`StaticSitesOperations` - * 2023-01-01: :class:`StaticSitesOperations` - * 2024-04-01: :class:`StaticSitesOperations` + * 2022-09-01: :class:`StaticSitesOperations` + * 2023-01-01: :class:`StaticSitesOperations` + * 2024-04-01: :class:`StaticSitesOperations` """ - api_version = self._get_api_version("static_sites") - if api_version == "2022-09-01": + api_version = self._get_api_version('static_sites') + if api_version == '2022-09-01': from .v2022_09_01.operations import StaticSitesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import StaticSitesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import StaticSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'static_sites'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def top_level_domains(self): """Instance depends on the API version: - * 2018-02-01: :class:`TopLevelDomainsOperations` - * 2022-09-01: :class:`TopLevelDomainsOperations` - * 2023-01-01: :class:`TopLevelDomainsOperations` - * 2024-04-01: :class:`TopLevelDomainsOperations` + * 2018-02-01: :class:`TopLevelDomainsOperations` + * 2022-09-01: :class:`TopLevelDomainsOperations` + * 2023-01-01: :class:`TopLevelDomainsOperations` + * 2024-04-01: :class:`TopLevelDomainsOperations` """ - api_version = self._get_api_version("top_level_domains") - if api_version == "2018-02-01": + api_version = self._get_api_version('top_level_domains') + if api_version == '2018-02-01': from .v2018_02_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import TopLevelDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'top_level_domains'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def web_apps(self): """Instance depends on the API version: - * 2018-02-01: :class:`WebAppsOperations` - * 2022-09-01: :class:`WebAppsOperations` - * 2023-01-01: :class:`WebAppsOperations` - * 2024-04-01: :class:`WebAppsOperations` + * 2018-02-01: :class:`WebAppsOperations` + * 2022-09-01: :class:`WebAppsOperations` + * 2023-01-01: :class:`WebAppsOperations` + * 2024-04-01: :class:`WebAppsOperations` """ - api_version = self._get_api_version("web_apps") - if api_version == "2018-02-01": + api_version = self._get_api_version('web_apps') + if api_version == '2018-02-01': from .v2018_02_01.operations import WebAppsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from .v2022_09_01.operations import WebAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WebAppsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WebAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_repetitions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionRepetitionsOperations` - * 2023-01-01: :class:`WorkflowRunActionRepetitionsOperations` - * 2024-04-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2022-09-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2023-01-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2024-04-01: :class:`WorkflowRunActionRepetitionsOperations` """ - api_version = self._get_api_version("workflow_run_action_repetitions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_action_repetitions') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowRunActionRepetitionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowRunActionRepetitionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowRunActionRepetitionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_repetitions'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_repetitions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_repetitions_request_histories(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` - * 2023-01-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` - * 2024-04-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + * 2022-09-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + * 2023-01-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + * 2024-04-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` """ - api_version = self._get_api_version("workflow_run_action_repetitions_request_histories") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_action_repetitions_request_histories') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_repetitions_request_histories'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_repetitions_request_histories'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_scope_repetitions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionScopeRepetitionsOperations` - * 2023-01-01: :class:`WorkflowRunActionScopeRepetitionsOperations` - * 2024-04-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2022-09-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2023-01-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2024-04-01: :class:`WorkflowRunActionScopeRepetitionsOperations` """ - api_version = self._get_api_version("workflow_run_action_scope_repetitions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_action_scope_repetitions') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_scope_repetitions'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_scope_repetitions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_actions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionsOperations` - * 2023-01-01: :class:`WorkflowRunActionsOperations` - * 2024-04-01: :class:`WorkflowRunActionsOperations` + * 2022-09-01: :class:`WorkflowRunActionsOperations` + * 2023-01-01: :class:`WorkflowRunActionsOperations` + * 2024-04-01: :class:`WorkflowRunActionsOperations` """ - api_version = self._get_api_version("workflow_run_actions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_actions') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowRunActionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowRunActionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowRunActionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_run_actions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_runs(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunsOperations` - * 2023-01-01: :class:`WorkflowRunsOperations` - * 2024-04-01: :class:`WorkflowRunsOperations` + * 2022-09-01: :class:`WorkflowRunsOperations` + * 2023-01-01: :class:`WorkflowRunsOperations` + * 2024-04-01: :class:`WorkflowRunsOperations` """ - api_version = self._get_api_version("workflow_runs") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_runs') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowRunsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowRunsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowRunsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_runs'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_trigger_histories(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowTriggerHistoriesOperations` - * 2023-01-01: :class:`WorkflowTriggerHistoriesOperations` - * 2024-04-01: :class:`WorkflowTriggerHistoriesOperations` + * 2022-09-01: :class:`WorkflowTriggerHistoriesOperations` + * 2023-01-01: :class:`WorkflowTriggerHistoriesOperations` + * 2024-04-01: :class:`WorkflowTriggerHistoriesOperations` """ - api_version = self._get_api_version("workflow_trigger_histories") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_trigger_histories') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowTriggerHistoriesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowTriggerHistoriesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowTriggerHistoriesOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_trigger_histories'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'workflow_trigger_histories'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_triggers(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowTriggersOperations` - * 2023-01-01: :class:`WorkflowTriggersOperations` - * 2024-04-01: :class:`WorkflowTriggersOperations` + * 2022-09-01: :class:`WorkflowTriggersOperations` + * 2023-01-01: :class:`WorkflowTriggersOperations` + * 2024-04-01: :class:`WorkflowTriggersOperations` """ - api_version = self._get_api_version("workflow_triggers") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_triggers') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowTriggersOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowTriggersOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowTriggersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_triggers'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_versions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowVersionsOperations` - * 2023-01-01: :class:`WorkflowVersionsOperations` - * 2024-04-01: :class:`WorkflowVersionsOperations` + * 2022-09-01: :class:`WorkflowVersionsOperations` + * 2023-01-01: :class:`WorkflowVersionsOperations` + * 2024-04-01: :class:`WorkflowVersionsOperations` """ - api_version = self._get_api_version("workflow_versions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_versions') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowVersionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowVersionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_versions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflows(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowsOperations` - * 2023-01-01: :class:`WorkflowsOperations` - * 2024-04-01: :class:`WorkflowsOperations` + * 2022-09-01: :class:`WorkflowsOperations` + * 2023-01-01: :class:`WorkflowsOperations` + * 2024-04-01: :class:`WorkflowsOperations` """ - api_version = self._get_api_version("workflows") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflows') + if api_version == '2022-09-01': from .v2022_09_01.operations import WorkflowsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from .v2023_01_01.operations import WorkflowsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from .v2024_04_01.operations import WorkflowsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflows'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) def close(self): self._client.close() - def __enter__(self): self._client.__enter__() return self - def __exit__(self, *exc_details): self._client.__exit__(*exc_details) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/__init__.py index 69d2fd6fad25..fc106a4f3d78 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/__init__.py @@ -7,5 +7,4 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient - -__all__ = ["WebSiteManagementClient"] +__all__ = ['WebSiteManagementClient'] diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_configuration.py index 40e8a9ad2994..1607b11f8966 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_configuration.py @@ -19,7 +19,6 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential - class WebSiteManagementClientConfiguration: """Configuration for WebSiteManagementClient. @@ -32,7 +31,12 @@ class WebSiteManagementClientConfiguration: :type subscription_id: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -40,22 +44,23 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) - kwargs.setdefault("sdk_moniker", "azure-mgmt-web/{}".format(VERSION)) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-web/{}'.format(VERSION)) self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( - self.credential, *self.credential_scopes, **kwargs - ) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py index 9654539b57b5..f139e66fb6d1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py @@ -21,7 +21,7 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object class WebSiteManagementClientOperationsMixin(object): @@ -56,16 +56,16 @@ async def check_name_availability( :rtype: ~azure.mgmt.web.v2024_04_01.models.ResourceNameAvailability :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("check_name_availability") - if api_version == "2016-03-01": + api_version = self._get_api_version('check_name_availability') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'check_name_availability'".format(api_version)) @@ -78,7 +78,10 @@ async def check_name_availability( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.check_name_availability(name, type, is_fqdn, environment_id, **kwargs) - async def get_publishing_user(self, **kwargs: Any) -> _models.User: + async def get_publishing_user( + self, + **kwargs: Any + ) -> _models.User: """Gets publishing user. Description for Gets publishing user. @@ -87,16 +90,16 @@ async def get_publishing_user(self, **kwargs: Any) -> _models.User: :rtype: ~azure.mgmt.web.v2024_04_01.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_publishing_user") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_publishing_user') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_publishing_user'".format(api_version)) @@ -109,7 +112,11 @@ async def get_publishing_user(self, **kwargs: Any) -> _models.User: mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_publishing_user(**kwargs) - async def get_source_control(self, source_control_type: str, **kwargs: Any) -> _models.SourceControl: + async def get_source_control( + self, + source_control_type: str, + **kwargs: Any + ) -> _models.SourceControl: """Gets source control token. Description for Gets source control token. @@ -120,16 +127,16 @@ async def get_source_control(self, source_control_type: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.web.v2024_04_01.models.SourceControl :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_source_control") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_source_control') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_source_control'".format(api_version)) @@ -142,7 +149,10 @@ async def get_source_control(self, source_control_type: str, **kwargs: Any) -> _ mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_source_control(source_control_type, **kwargs) - async def get_subscription_deployment_locations(self, **kwargs: Any) -> _models.DeploymentLocations: + async def get_subscription_deployment_locations( + self, + **kwargs: Any + ) -> _models.DeploymentLocations: """Gets list of available geo regions plus ministamps. Description for Gets list of available geo regions plus ministamps. @@ -151,21 +161,19 @@ async def get_subscription_deployment_locations(self, **kwargs: Any) -> _models. :rtype: ~azure.mgmt.web.v2024_04_01.models.DeploymentLocations :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("get_subscription_deployment_locations") - if api_version == "2016-03-01": + api_version = self._get_api_version('get_subscription_deployment_locations') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version) - ) + raise ValueError("API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -175,7 +183,10 @@ async def get_subscription_deployment_locations(self, **kwargs: Any) -> _models. mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_subscription_deployment_locations(**kwargs) - def list_ase_regions(self, **kwargs: Any) -> AsyncIterable["_models.AseRegion"]: + def list_ase_regions( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AseRegion"]: """Get a list of available ASE regions and its supported Skus. Description for get a list of available ASE regions and its supported Skus. @@ -184,10 +195,10 @@ def list_ase_regions(self, **kwargs: Any) -> AsyncIterable["_models.AseRegion"]: :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.AseRegion] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_ase_regions") - if api_version == "2023-01-01": + api_version = self._get_api_version('list_ase_regions') + if api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_ase_regions'".format(api_version)) @@ -201,7 +212,10 @@ def list_ase_regions(self, **kwargs: Any) -> AsyncIterable["_models.AseRegion"]: return mixin_instance.list_ase_regions(**kwargs) def list_billing_meters( - self, billing_location: Optional[str] = None, os_type: Optional[str] = None, **kwargs: Any + self, + billing_location: Optional[str] = None, + os_type: Optional[str] = None, + **kwargs: Any ) -> AsyncIterable["_models.BillingMeter"]: """Gets a list of meters for a given location. @@ -216,14 +230,14 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.BillingMeter] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_billing_meters") - if api_version == "2018-02-01": + api_version = self._get_api_version('list_billing_meters') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_billing_meters'".format(api_version)) @@ -237,7 +251,9 @@ def list_billing_meters( return mixin_instance.list_billing_meters(billing_location, os_type, **kwargs) def list_custom_host_name_sites( - self, hostname: Optional[str] = None, **kwargs: Any + self, + hostname: Optional[str] = None, + **kwargs: Any ) -> AsyncIterable["_models.CustomHostnameSites"]: """Get custom hostnames under this subscription. @@ -250,12 +266,12 @@ def list_custom_host_name_sites( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.CustomHostnameSites] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_custom_host_name_sites") - if api_version == "2022-09-01": + api_version = self._get_api_version('list_custom_host_name_sites') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_custom_host_name_sites'".format(api_version)) @@ -298,16 +314,16 @@ def list_geo_regions( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.GeoRegion] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_geo_regions") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_geo_regions') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_geo_regions'".format(api_version)) @@ -318,11 +334,12 @@ def list_geo_regions( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.list_geo_regions( - sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, **kwargs - ) + return mixin_instance.list_geo_regions(sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, **kwargs) - def list_premier_add_on_offers(self, **kwargs: Any) -> AsyncIterable["_models.PremierAddOnOffer"]: + def list_premier_add_on_offers( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PremierAddOnOffer"]: """List all premier add-on offers. Description for List all premier add-on offers. @@ -332,16 +349,16 @@ def list_premier_add_on_offers(self, **kwargs: Any) -> AsyncIterable["_models.Pr ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.PremierAddOnOffer] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_premier_add_on_offers") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_premier_add_on_offers') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_premier_add_on_offers'".format(api_version)) @@ -355,7 +372,9 @@ def list_premier_add_on_offers(self, **kwargs: Any) -> AsyncIterable["_models.Pr return mixin_instance.list_premier_add_on_offers(**kwargs) def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-long - self, name_identifier: Union[_models.NameIdentifier, IO[bytes]], **kwargs: Any + self, + name_identifier: Union[_models.NameIdentifier, IO[bytes]], + **kwargs: Any ) -> AsyncIterable["_models.Identifier"]: """List all apps that are assigned to a hostname. @@ -368,23 +387,19 @@ def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-lon :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.Identifier] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_site_identifiers_assigned_to_host_name") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -394,7 +409,10 @@ def list_site_identifiers_assigned_to_host_name( # pylint: disable=name-too-lon mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.list_site_identifiers_assigned_to_host_name(name_identifier, **kwargs) - async def list_skus(self, **kwargs: Any) -> _models.SkuInfos: + async def list_skus( + self, + **kwargs: Any + ) -> _models.SkuInfos: """List all SKUs. Description for List all SKUs. @@ -403,16 +421,16 @@ async def list_skus(self, **kwargs: Any) -> _models.SkuInfos: :rtype: ~azure.mgmt.web.v2024_04_01.models.SkuInfos :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_skus") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_skus') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_skus'".format(api_version)) @@ -425,7 +443,10 @@ async def list_skus(self, **kwargs: Any) -> _models.SkuInfos: mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.list_skus(**kwargs) - def list_source_controls(self, **kwargs: Any) -> AsyncIterable["_models.SourceControl"]: + def list_source_controls( + self, + **kwargs: Any + ) -> AsyncIterable["_models.SourceControl"]: """Gets the source controls available for Azure websites. Description for Gets the source controls available for Azure websites. @@ -435,16 +456,16 @@ def list_source_controls(self, **kwargs: Any) -> AsyncIterable["_models.SourceCo ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.SourceControl] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("list_source_controls") - if api_version == "2016-03-01": + api_version = self._get_api_version('list_source_controls') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_source_controls'".format(api_version)) @@ -477,16 +498,16 @@ async def move( :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("move") - if api_version == "2016-03-01": + api_version = self._get_api_version('move') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'move'".format(api_version)) @@ -499,7 +520,11 @@ async def move( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.move(resource_group_name, move_resource_envelope, **kwargs) - async def update_publishing_user(self, user_details: Union[_models.User, IO[bytes]], **kwargs: Any) -> _models.User: + async def update_publishing_user( + self, + user_details: Union[_models.User, IO[bytes]], + **kwargs: Any + ) -> _models.User: """Updates publishing user. Description for Updates publishing user. @@ -511,16 +536,16 @@ async def update_publishing_user(self, user_details: Union[_models.User, IO[byte :rtype: ~azure.mgmt.web.v2024_04_01.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("update_publishing_user") - if api_version == "2016-03-01": + api_version = self._get_api_version('update_publishing_user') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'update_publishing_user'".format(api_version)) @@ -534,7 +559,10 @@ async def update_publishing_user(self, user_details: Union[_models.User, IO[byte return await mixin_instance.update_publishing_user(user_details, **kwargs) async def update_source_control( - self, source_control_type: str, request_message: Union[_models.SourceControl, IO[bytes]], **kwargs: Any + self, + source_control_type: str, + request_message: Union[_models.SourceControl, IO[bytes]], + **kwargs: Any ) -> _models.SourceControl: """Updates source control token. @@ -549,16 +577,16 @@ async def update_source_control( :rtype: ~azure.mgmt.web.v2024_04_01.models.SourceControl :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("update_source_control") - if api_version == "2016-03-01": + api_version = self._get_api_version('update_source_control') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'update_source_control'".format(api_version)) @@ -572,7 +600,10 @@ async def update_source_control( return await mixin_instance.update_source_control(source_control_type, request_message, **kwargs) async def validate( - self, resource_group_name: str, validate_request: Union[_models.ValidateRequest, IO[bytes]], **kwargs: Any + self, + resource_group_name: str, + validate_request: Union[_models.ValidateRequest, IO[bytes]], + **kwargs: Any ) -> _models.ValidateResponse: """Validate if a resource can be created. @@ -587,16 +618,16 @@ async def validate( :rtype: ~azure.mgmt.web.v2024_04_01.models.ValidateResponse :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate") - if api_version == "2016-03-01": + api_version = self._get_api_version('validate') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate'".format(api_version)) @@ -629,8 +660,8 @@ async def validate_container_settings( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate_container_settings") - if api_version == "2018-02-01": + api_version = self._get_api_version('validate_container_settings') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate_container_settings'".format(api_version)) @@ -641,9 +672,7 @@ async def validate_container_settings( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.validate_container_settings( - resource_group_name, validate_container_settings_request, **kwargs - ) + return await mixin_instance.validate_container_settings(resource_group_name, validate_container_settings_request, **kwargs) async def validate_move( self, @@ -665,16 +694,16 @@ async def validate_move( :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("validate_move") - if api_version == "2016-03-01": + api_version = self._get_api_version('validate_move') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'validate_move'".format(api_version)) @@ -688,7 +717,9 @@ async def validate_move( return await mixin_instance.validate_move(resource_group_name, move_resource_envelope, **kwargs) async def verify_hosting_environment_vnet( - self, parameters: Union[_models.VnetParameters, IO[bytes]], **kwargs: Any + self, + parameters: Union[_models.VnetParameters, IO[bytes]], + **kwargs: Any ) -> _models.VnetValidationFailureDetails: """Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. @@ -703,21 +734,19 @@ async def verify_hosting_environment_vnet( :rtype: ~azure.mgmt.web.v2024_04_01.models.VnetValidationFailureDetails :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version("verify_hosting_environment_vnet") - if api_version == "2016-03-01": + api_version = self._get_api_version('verify_hosting_environment_vnet') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass else: - raise ValueError( - "API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version) - ) + raise ValueError("API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version)) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py index 3c9ce7907d27..839b333072aa 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py @@ -26,7 +26,6 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential - class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -34,7 +33,6 @@ def __init__(self, *args, **kwargs): """ pass - class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """WebSite Management Client. @@ -59,17 +57,17 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = "2024-04-01" + DEFAULT_API_VERSION = '2024-04-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" - LATEST_PROFILE = ProfileDefinition( - { - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - "billing_meters": "2016-03-01", - "validate_container_settings": "2018-02-01", - } - }, - _PROFILE_TAG + " latest", + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'billing_meters': '2016-03-01', + 'container_apps': '2023-01-01', + 'container_apps_revisions': '2023-01-01', + 'validate_container_settings': '2018-02-01', + }}, + _PROFILE_TAG + " latest" ) def __init__( @@ -82,7 +80,7 @@ def __init__( **kwargs: Any ) -> None: if api_version: - kwargs.setdefault("api_version", api_version) + kwargs.setdefault('api_version', api_version) self._config = WebSiteManagementClientConfiguration(credential, subscription_id, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: @@ -102,8 +100,11 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) - super(WebSiteManagementClient, self).__init__(api_version=api_version, profile=profile) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + super(WebSiteManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) @classmethod def _models_dict(cls, api_version): @@ -113,31 +114,26 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2016-03-01: :mod:`v2016_03_01.models` - * 2018-02-01: :mod:`v2018_02_01.models` - * 2022-09-01: :mod:`v2022_09_01.models` - * 2023-01-01: :mod:`v2023_01_01.models` - * 2024-04-01: :mod:`v2024_04_01.models` + * 2016-03-01: :mod:`v2016_03_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2022-09-01: :mod:`v2022_09_01.models` + * 2023-01-01: :mod:`v2023_01_01.models` + * 2024-04-01: :mod:`v2024_04_01.models` """ - if api_version == "2016-03-01": + if api_version == '2016-03-01': from ..v2016_03_01 import models - return models - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01 import models - return models - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01 import models - return models - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01 import models - return models - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01 import models - return models raise ValueError("API version {} is not available".format(api_version)) @@ -145,899 +141,671 @@ def models(cls, api_version=DEFAULT_API_VERSION): def app_service_certificate_orders(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` - * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2024-04-01: :class:`AppServiceCertificateOrdersOperations` + * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` + * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` + * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` + * 2024-04-01: :class:`AppServiceCertificateOrdersOperations` """ - api_version = self._get_api_version("app_service_certificate_orders") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_certificate_orders') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'app_service_certificate_orders'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'app_service_certificate_orders'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def app_service_environments(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServiceEnvironmentsOperations` - * 2022-09-01: :class:`AppServiceEnvironmentsOperations` - * 2023-01-01: :class:`AppServiceEnvironmentsOperations` - * 2024-04-01: :class:`AppServiceEnvironmentsOperations` + * 2018-02-01: :class:`AppServiceEnvironmentsOperations` + * 2022-09-01: :class:`AppServiceEnvironmentsOperations` + * 2023-01-01: :class:`AppServiceEnvironmentsOperations` + * 2024-04-01: :class:`AppServiceEnvironmentsOperations` """ - api_version = self._get_api_version("app_service_environments") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_environments') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'app_service_environments'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'app_service_environments'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def app_service_plans(self): """Instance depends on the API version: - * 2018-02-01: :class:`AppServicePlansOperations` - * 2022-09-01: :class:`AppServicePlansOperations` - * 2023-01-01: :class:`AppServicePlansOperations` - * 2024-04-01: :class:`AppServicePlansOperations` + * 2018-02-01: :class:`AppServicePlansOperations` + * 2022-09-01: :class:`AppServicePlansOperations` + * 2023-01-01: :class:`AppServicePlansOperations` + * 2024-04-01: :class:`AppServicePlansOperations` """ - api_version = self._get_api_version("app_service_plans") - if api_version == "2018-02-01": + api_version = self._get_api_version('app_service_plans') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import AppServicePlansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'app_service_plans'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def billing_meters(self): """Instance depends on the API version: - * 2016-03-01: :class:`BillingMetersOperations` + * 2016-03-01: :class:`BillingMetersOperations` """ - api_version = self._get_api_version("billing_meters") - if api_version == "2016-03-01": + api_version = self._get_api_version('billing_meters') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import BillingMetersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'billing_meters'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificate_orders_diagnostics(self): """Instance depends on the API version: - * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2024-04-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` + * 2024-04-01: :class:`CertificateOrdersDiagnosticsOperations` """ - api_version = self._get_api_version("certificate_orders_diagnostics") - if api_version == "2022-09-01": + api_version = self._get_api_version('certificate_orders_diagnostics') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificate_registration_provider(self): """Instance depends on the API version: - * 2018-02-01: :class:`CertificateRegistrationProviderOperations` - * 2022-09-01: :class:`CertificateRegistrationProviderOperations` - * 2023-01-01: :class:`CertificateRegistrationProviderOperations` - * 2024-04-01: :class:`CertificateRegistrationProviderOperations` + * 2018-02-01: :class:`CertificateRegistrationProviderOperations` + * 2022-09-01: :class:`CertificateRegistrationProviderOperations` + * 2023-01-01: :class:`CertificateRegistrationProviderOperations` + * 2024-04-01: :class:`CertificateRegistrationProviderOperations` """ - api_version = self._get_api_version("certificate_registration_provider") - if api_version == "2018-02-01": + api_version = self._get_api_version('certificate_registration_provider') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'certificate_registration_provider'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'certificate_registration_provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def certificates(self): """Instance depends on the API version: - * 2016-03-01: :class:`CertificatesOperations` - * 2018-02-01: :class:`CertificatesOperations` - * 2022-09-01: :class:`CertificatesOperations` - * 2023-01-01: :class:`CertificatesOperations` - * 2024-04-01: :class:`CertificatesOperations` + * 2016-03-01: :class:`CertificatesOperations` + * 2018-02-01: :class:`CertificatesOperations` + * 2022-09-01: :class:`CertificatesOperations` + * 2023-01-01: :class:`CertificatesOperations` + * 2024-04-01: :class:`CertificatesOperations` """ - api_version = self._get_api_version("certificates") - if api_version == "2016-03-01": + api_version = self._get_api_version('certificates') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def container_apps(self): """Instance depends on the API version: - * 2022-09-01: :class:`ContainerAppsOperations` - * 2023-01-01: :class:`ContainerAppsOperations` - * 2024-04-01: :class:`ContainerAppsOperations` + * 2022-09-01: :class:`ContainerAppsOperations` + * 2023-01-01: :class:`ContainerAppsOperations` """ - api_version = self._get_api_version("container_apps") - if api_version == "2022-09-01": + api_version = self._get_api_version('container_apps') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import ContainerAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import ContainerAppsOperations as OperationClass - elif api_version == "2024-04-01": - from ..v2024_04_01.aio.operations import ContainerAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'container_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def container_apps_revisions(self): """Instance depends on the API version: - * 2022-09-01: :class:`ContainerAppsRevisionsOperations` - * 2023-01-01: :class:`ContainerAppsRevisionsOperations` - * 2024-04-01: :class:`ContainerAppsRevisionsOperations` + * 2022-09-01: :class:`ContainerAppsRevisionsOperations` + * 2023-01-01: :class:`ContainerAppsRevisionsOperations` """ - api_version = self._get_api_version("container_apps_revisions") - if api_version == "2022-09-01": + api_version = self._get_api_version('container_apps_revisions') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == "2024-04-01": - from ..v2024_04_01.aio.operations import ContainerAppsRevisionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'container_apps_revisions'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'container_apps_revisions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def deleted_web_apps(self): """Instance depends on the API version: - * 2016-03-01: :class:`DeletedWebAppsOperations` - * 2018-02-01: :class:`DeletedWebAppsOperations` - * 2022-09-01: :class:`DeletedWebAppsOperations` - * 2023-01-01: :class:`DeletedWebAppsOperations` - * 2024-04-01: :class:`DeletedWebAppsOperations` + * 2016-03-01: :class:`DeletedWebAppsOperations` + * 2018-02-01: :class:`DeletedWebAppsOperations` + * 2022-09-01: :class:`DeletedWebAppsOperations` + * 2023-01-01: :class:`DeletedWebAppsOperations` + * 2024-04-01: :class:`DeletedWebAppsOperations` """ - api_version = self._get_api_version("deleted_web_apps") - if api_version == "2016-03-01": + api_version = self._get_api_version('deleted_web_apps') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import DeletedWebAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deleted_web_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def diagnostics(self): """Instance depends on the API version: - * 2016-03-01: :class:`DiagnosticsOperations` - * 2018-02-01: :class:`DiagnosticsOperations` - * 2022-09-01: :class:`DiagnosticsOperations` - * 2023-01-01: :class:`DiagnosticsOperations` - * 2024-04-01: :class:`DiagnosticsOperations` + * 2016-03-01: :class:`DiagnosticsOperations` + * 2018-02-01: :class:`DiagnosticsOperations` + * 2022-09-01: :class:`DiagnosticsOperations` + * 2023-01-01: :class:`DiagnosticsOperations` + * 2024-04-01: :class:`DiagnosticsOperations` """ - api_version = self._get_api_version("diagnostics") - if api_version == "2016-03-01": + api_version = self._get_api_version('diagnostics') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import DiagnosticsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostics'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def domain_registration_provider(self): """Instance depends on the API version: - * 2018-02-01: :class:`DomainRegistrationProviderOperations` - * 2022-09-01: :class:`DomainRegistrationProviderOperations` - * 2023-01-01: :class:`DomainRegistrationProviderOperations` - * 2024-04-01: :class:`DomainRegistrationProviderOperations` + * 2018-02-01: :class:`DomainRegistrationProviderOperations` + * 2022-09-01: :class:`DomainRegistrationProviderOperations` + * 2023-01-01: :class:`DomainRegistrationProviderOperations` + * 2024-04-01: :class:`DomainRegistrationProviderOperations` """ - api_version = self._get_api_version("domain_registration_provider") - if api_version == "2018-02-01": + api_version = self._get_api_version('domain_registration_provider') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import DomainRegistrationProviderOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'domain_registration_provider'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'domain_registration_provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def domains(self): """Instance depends on the API version: - * 2018-02-01: :class:`DomainsOperations` - * 2022-09-01: :class:`DomainsOperations` - * 2023-01-01: :class:`DomainsOperations` - * 2024-04-01: :class:`DomainsOperations` + * 2018-02-01: :class:`DomainsOperations` + * 2022-09-01: :class:`DomainsOperations` + * 2023-01-01: :class:`DomainsOperations` + * 2024-04-01: :class:`DomainsOperations` """ - api_version = self._get_api_version("domains") - if api_version == "2018-02-01": + api_version = self._get_api_version('domains') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import DomainsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import DomainsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import DomainsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import DomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'domains'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def get_usages_in_location(self): """Instance depends on the API version: - * 2023-01-01: :class:`GetUsagesInLocationOperations` - * 2024-04-01: :class:`GetUsagesInLocationOperations` + * 2023-01-01: :class:`GetUsagesInLocationOperations` + * 2024-04-01: :class:`GetUsagesInLocationOperations` """ - api_version = self._get_api_version("get_usages_in_location") - if api_version == "2023-01-01": + api_version = self._get_api_version('get_usages_in_location') + if api_version == '2023-01-01': from ..v2023_01_01.aio.operations import GetUsagesInLocationOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import GetUsagesInLocationOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'get_usages_in_location'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'get_usages_in_location'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def global_operations(self): """Instance depends on the API version: - * 2022-09-01: :class:`GlobalOperations` - * 2023-01-01: :class:`GlobalOperations` - * 2024-04-01: :class:`GlobalOperations` + * 2022-09-01: :class:`GlobalOperations` + * 2023-01-01: :class:`GlobalOperations` + * 2024-04-01: :class:`GlobalOperations` """ - api_version = self._get_api_version("global_operations") - if api_version == "2022-09-01": + api_version = self._get_api_version('global_operations') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import GlobalOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import GlobalOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import GlobalOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'global_operations'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def kube_environments(self): """Instance depends on the API version: - * 2022-09-01: :class:`KubeEnvironmentsOperations` - * 2023-01-01: :class:`KubeEnvironmentsOperations` - * 2024-04-01: :class:`KubeEnvironmentsOperations` + * 2022-09-01: :class:`KubeEnvironmentsOperations` + * 2023-01-01: :class:`KubeEnvironmentsOperations` + * 2024-04-01: :class:`KubeEnvironmentsOperations` """ - api_version = self._get_api_version("kube_environments") - if api_version == "2022-09-01": + api_version = self._get_api_version('kube_environments') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import KubeEnvironmentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'kube_environments'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def provider(self): """Instance depends on the API version: - * 2016-03-01: :class:`ProviderOperations` - * 2018-02-01: :class:`ProviderOperations` - * 2022-09-01: :class:`ProviderOperations` - * 2023-01-01: :class:`ProviderOperations` - * 2024-04-01: :class:`ProviderOperations` + * 2016-03-01: :class:`ProviderOperations` + * 2018-02-01: :class:`ProviderOperations` + * 2022-09-01: :class:`ProviderOperations` + * 2023-01-01: :class:`ProviderOperations` + * 2024-04-01: :class:`ProviderOperations` """ - api_version = self._get_api_version("provider") - if api_version == "2016-03-01": + api_version = self._get_api_version('provider') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import ProviderOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import ProviderOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import ProviderOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import ProviderOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import ProviderOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'provider'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def recommendations(self): """Instance depends on the API version: - * 2016-03-01: :class:`RecommendationsOperations` - * 2018-02-01: :class:`RecommendationsOperations` - * 2022-09-01: :class:`RecommendationsOperations` - * 2023-01-01: :class:`RecommendationsOperations` - * 2024-04-01: :class:`RecommendationsOperations` + * 2016-03-01: :class:`RecommendationsOperations` + * 2018-02-01: :class:`RecommendationsOperations` + * 2022-09-01: :class:`RecommendationsOperations` + * 2023-01-01: :class:`RecommendationsOperations` + * 2024-04-01: :class:`RecommendationsOperations` """ - api_version = self._get_api_version("recommendations") - if api_version == "2016-03-01": + api_version = self._get_api_version('recommendations') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import RecommendationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'recommendations'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def resource_health_metadata(self): """Instance depends on the API version: - * 2016-03-01: :class:`ResourceHealthMetadataOperations` - * 2018-02-01: :class:`ResourceHealthMetadataOperations` - * 2022-09-01: :class:`ResourceHealthMetadataOperations` - * 2023-01-01: :class:`ResourceHealthMetadataOperations` - * 2024-04-01: :class:`ResourceHealthMetadataOperations` + * 2016-03-01: :class:`ResourceHealthMetadataOperations` + * 2018-02-01: :class:`ResourceHealthMetadataOperations` + * 2022-09-01: :class:`ResourceHealthMetadataOperations` + * 2023-01-01: :class:`ResourceHealthMetadataOperations` + * 2024-04-01: :class:`ResourceHealthMetadataOperations` """ - api_version = self._get_api_version("resource_health_metadata") - if api_version == "2016-03-01": + api_version = self._get_api_version('resource_health_metadata') + if api_version == '2016-03-01': from ..v2016_03_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2018-02-01": + elif api_version == '2018-02-01': from ..v2018_02_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import ResourceHealthMetadataOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'resource_health_metadata'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'resource_health_metadata'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def static_sites(self): """Instance depends on the API version: - * 2022-09-01: :class:`StaticSitesOperations` - * 2023-01-01: :class:`StaticSitesOperations` - * 2024-04-01: :class:`StaticSitesOperations` + * 2022-09-01: :class:`StaticSitesOperations` + * 2023-01-01: :class:`StaticSitesOperations` + * 2024-04-01: :class:`StaticSitesOperations` """ - api_version = self._get_api_version("static_sites") - if api_version == "2022-09-01": + api_version = self._get_api_version('static_sites') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import StaticSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'static_sites'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def top_level_domains(self): """Instance depends on the API version: - * 2018-02-01: :class:`TopLevelDomainsOperations` - * 2022-09-01: :class:`TopLevelDomainsOperations` - * 2023-01-01: :class:`TopLevelDomainsOperations` - * 2024-04-01: :class:`TopLevelDomainsOperations` + * 2018-02-01: :class:`TopLevelDomainsOperations` + * 2022-09-01: :class:`TopLevelDomainsOperations` + * 2023-01-01: :class:`TopLevelDomainsOperations` + * 2024-04-01: :class:`TopLevelDomainsOperations` """ - api_version = self._get_api_version("top_level_domains") - if api_version == "2018-02-01": + api_version = self._get_api_version('top_level_domains') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import TopLevelDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'top_level_domains'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def web_apps(self): """Instance depends on the API version: - * 2018-02-01: :class:`WebAppsOperations` - * 2022-09-01: :class:`WebAppsOperations` - * 2023-01-01: :class:`WebAppsOperations` - * 2024-04-01: :class:`WebAppsOperations` + * 2018-02-01: :class:`WebAppsOperations` + * 2022-09-01: :class:`WebAppsOperations` + * 2023-01-01: :class:`WebAppsOperations` + * 2024-04-01: :class:`WebAppsOperations` """ - api_version = self._get_api_version("web_apps") - if api_version == "2018-02-01": + api_version = self._get_api_version('web_apps') + if api_version == '2018-02-01': from ..v2018_02_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == "2022-09-01": + elif api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WebAppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_apps'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_repetitions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionRepetitionsOperations` - * 2023-01-01: :class:`WorkflowRunActionRepetitionsOperations` - * 2024-04-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2022-09-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2023-01-01: :class:`WorkflowRunActionRepetitionsOperations` + * 2024-04-01: :class:`WorkflowRunActionRepetitionsOperations` """ - api_version = self._get_api_version("workflow_run_action_repetitions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_action_repetitions') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowRunActionRepetitionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowRunActionRepetitionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowRunActionRepetitionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_repetitions'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_repetitions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_repetitions_request_histories(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` - * 2023-01-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` - * 2024-04-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` - """ - api_version = self._get_api_version("workflow_run_action_repetitions_request_histories") - if api_version == "2022-09-01": - from ..v2022_09_01.aio.operations import ( - WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass, - ) - elif api_version == "2023-01-01": - from ..v2023_01_01.aio.operations import ( - WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass, - ) - elif api_version == "2024-04-01": - from ..v2024_04_01.aio.operations import ( - WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass, - ) + * 2022-09-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + * 2023-01-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + * 2024-04-01: :class:`WorkflowRunActionRepetitionsRequestHistoriesOperations` + """ + api_version = self._get_api_version('workflow_run_action_repetitions_request_histories') + if api_version == '2022-09-01': + from ..v2022_09_01.aio.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass + elif api_version == '2024-04-01': + from ..v2024_04_01.aio.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_repetitions_request_histories'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_repetitions_request_histories'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_action_scope_repetitions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionScopeRepetitionsOperations` - * 2023-01-01: :class:`WorkflowRunActionScopeRepetitionsOperations` - * 2024-04-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2022-09-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2023-01-01: :class:`WorkflowRunActionScopeRepetitionsOperations` + * 2024-04-01: :class:`WorkflowRunActionScopeRepetitionsOperations` """ - api_version = self._get_api_version("workflow_run_action_scope_repetitions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_action_scope_repetitions') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowRunActionScopeRepetitionsOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_run_action_scope_repetitions'".format( - api_version - ) - ) + raise ValueError("API version {} does not have operation group 'workflow_run_action_scope_repetitions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_run_actions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunActionsOperations` - * 2023-01-01: :class:`WorkflowRunActionsOperations` - * 2024-04-01: :class:`WorkflowRunActionsOperations` + * 2022-09-01: :class:`WorkflowRunActionsOperations` + * 2023-01-01: :class:`WorkflowRunActionsOperations` + * 2024-04-01: :class:`WorkflowRunActionsOperations` """ - api_version = self._get_api_version("workflow_run_actions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_run_actions') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowRunActionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowRunActionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowRunActionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_run_actions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_runs(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowRunsOperations` - * 2023-01-01: :class:`WorkflowRunsOperations` - * 2024-04-01: :class:`WorkflowRunsOperations` + * 2022-09-01: :class:`WorkflowRunsOperations` + * 2023-01-01: :class:`WorkflowRunsOperations` + * 2024-04-01: :class:`WorkflowRunsOperations` """ - api_version = self._get_api_version("workflow_runs") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_runs') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowRunsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowRunsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowRunsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_runs'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_trigger_histories(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowTriggerHistoriesOperations` - * 2023-01-01: :class:`WorkflowTriggerHistoriesOperations` - * 2024-04-01: :class:`WorkflowTriggerHistoriesOperations` + * 2022-09-01: :class:`WorkflowTriggerHistoriesOperations` + * 2023-01-01: :class:`WorkflowTriggerHistoriesOperations` + * 2024-04-01: :class:`WorkflowTriggerHistoriesOperations` """ - api_version = self._get_api_version("workflow_trigger_histories") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_trigger_histories') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowTriggerHistoriesOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowTriggerHistoriesOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowTriggerHistoriesOperations as OperationClass else: - raise ValueError( - "API version {} does not have operation group 'workflow_trigger_histories'".format(api_version) - ) + raise ValueError("API version {} does not have operation group 'workflow_trigger_histories'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_triggers(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowTriggersOperations` - * 2023-01-01: :class:`WorkflowTriggersOperations` - * 2024-04-01: :class:`WorkflowTriggersOperations` + * 2022-09-01: :class:`WorkflowTriggersOperations` + * 2023-01-01: :class:`WorkflowTriggersOperations` + * 2024-04-01: :class:`WorkflowTriggersOperations` """ - api_version = self._get_api_version("workflow_triggers") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_triggers') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowTriggersOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowTriggersOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowTriggersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_triggers'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflow_versions(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowVersionsOperations` - * 2023-01-01: :class:`WorkflowVersionsOperations` - * 2024-04-01: :class:`WorkflowVersionsOperations` + * 2022-09-01: :class:`WorkflowVersionsOperations` + * 2023-01-01: :class:`WorkflowVersionsOperations` + * 2024-04-01: :class:`WorkflowVersionsOperations` """ - api_version = self._get_api_version("workflow_versions") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflow_versions') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowVersionsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowVersionsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflow_versions'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) @property def workflows(self): """Instance depends on the API version: - * 2022-09-01: :class:`WorkflowsOperations` - * 2023-01-01: :class:`WorkflowsOperations` - * 2024-04-01: :class:`WorkflowsOperations` + * 2022-09-01: :class:`WorkflowsOperations` + * 2023-01-01: :class:`WorkflowsOperations` + * 2024-04-01: :class:`WorkflowsOperations` """ - api_version = self._get_api_version("workflows") - if api_version == "2022-09-01": + api_version = self._get_api_version('workflows') + if api_version == '2022-09-01': from ..v2022_09_01.aio.operations import WorkflowsOperations as OperationClass - elif api_version == "2023-01-01": + elif api_version == '2023-01-01': from ..v2023_01_01.aio.operations import WorkflowsOperations as OperationClass - elif api_version == "2024-04-01": + elif api_version == '2024-04-01': from ..v2024_04_01.aio.operations import WorkflowsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'workflows'".format(api_version)) self._config.api_version = api_version - return OperationClass( - self._client, - self._config, - Serializer(self._models_dict(api_version)), - Deserializer(self._models_dict(api_version)), - api_version, - ) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) async def close(self): await self._client.close() - async def __aenter__(self): await self._client.__aenter__() return self - async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py index 77fca9df38c4..da1848f10eec 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py @@ -6,4 +6,5 @@ # -------------------------------------------------------------------------- from .v2016_03_01.models import * from .v2018_02_01.models import * +from .v2023_01_01.models import * from .v2024_04_01.models import * diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py index 142a0420b39b..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py index 142a0420b39b..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/_version.py index 142a0420b39b..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_app_service_plans_operations.py index 27d62c9e7400..d849abb5dd56 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_app_service_plans_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -287,12 +273,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -320,7 +303,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1589,12 +1572,9 @@ async def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1623,7 +1603,7 @@ async def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1938,12 +1918,9 @@ async def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1973,7 +1950,7 @@ async def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2083,16 +2060,9 @@ async def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2134,7 +2104,7 @@ async def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2167,12 +2137,9 @@ async def delete_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2202,7 +2169,7 @@ async def delete_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2308,16 +2275,9 @@ async def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2359,7 +2319,7 @@ async def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_container_apps_operations.py index aec5f80bee60..1eabeda643b5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_container_apps_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -243,12 +243,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -276,7 +273,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_domains_operations.py index 2b1c50488af8..63b5d0348557 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -1552,10 +1552,6 @@ async def transfer_out(self, resource_group_name: str, domain_name: str, **kwarg 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_web_apps_operations.py index dd0ea4b1a107..07362bf191bd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_web_apps_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -665,12 +651,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -698,7 +681,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -931,12 +914,9 @@ async def delete( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -966,7 +946,7 @@ async def delete( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1603,12 +1583,9 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1637,7 +1614,7 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5794,12 +5771,9 @@ async def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5828,7 +5802,7 @@ async def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5917,12 +5891,9 @@ async def start_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5951,7 +5922,7 @@ async def start_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5978,12 +5949,9 @@ async def stop_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -6012,7 +5980,7 @@ async def stop_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7334,11 +7302,8 @@ async def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7383,7 +7348,7 @@ async def _create_ms_deploy_operation_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7535,12 +7500,9 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7568,7 +7530,7 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7719,12 +7681,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7775,7 +7734,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7860,12 +7819,9 @@ async def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7894,7 +7850,7 @@ async def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8131,12 +8087,9 @@ async def delete_function(self, resource_group_name: str, name: str, function_na """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8165,7 +8118,7 @@ async def delete_function(self, resource_group_name: str, name: str, function_na response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8348,12 +8301,9 @@ async def delete_function_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8383,7 +8333,7 @@ async def delete_function_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8853,12 +8803,9 @@ async def delete_host_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8888,7 +8835,7 @@ async def delete_host_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9488,12 +9435,9 @@ async def delete_hybrid_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -9523,7 +9467,7 @@ async def delete_hybrid_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10033,12 +9977,9 @@ async def delete_relay_service_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10067,7 +10008,7 @@ async def delete_relay_service_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10444,11 +10385,8 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10494,7 +10432,7 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10664,12 +10602,9 @@ async def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10698,7 +10633,7 @@ async def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10738,12 +10673,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10795,7 +10727,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10827,12 +10759,9 @@ async def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10862,7 +10791,7 @@ async def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10898,12 +10827,9 @@ async def delete_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10933,7 +10859,7 @@ async def delete_instance_process( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10964,12 +10890,9 @@ async def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11004,7 +10927,7 @@ async def get_instance_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11047,12 +10970,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11105,7 +11025,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11139,12 +11059,9 @@ async def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11175,7 +11092,7 @@ async def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11217,12 +11134,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11275,7 +11189,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12183,12 +12097,9 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12216,7 +12127,7 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12397,12 +12308,9 @@ async def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12431,7 +12339,7 @@ async def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14388,12 +14296,9 @@ def list_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14444,7 +14349,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14473,12 +14378,9 @@ async def get_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14507,7 +14409,7 @@ async def get_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14538,12 +14440,9 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14572,7 +14471,7 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14600,12 +14499,9 @@ async def get_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14639,7 +14535,7 @@ async def get_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14679,12 +14575,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14736,7 +14629,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14767,12 +14660,9 @@ async def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14802,7 +14692,7 @@ async def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14841,12 +14731,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14898,7 +14785,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16113,12 +16000,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16169,7 +16053,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16197,12 +16081,9 @@ async def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16231,7 +16112,7 @@ async def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16250,10 +16131,6 @@ async def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16383,12 +16260,9 @@ async def delete_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16417,7 +16291,7 @@ async def delete_site_extension( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16526,12 +16400,9 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16560,7 +16431,7 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16820,12 +16691,9 @@ async def delete_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16856,7 +16724,7 @@ async def delete_slot( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17555,12 +17423,9 @@ async def delete_backup_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17590,7 +17455,7 @@ async def delete_backup_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21862,12 +21727,9 @@ async def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -21897,7 +21759,7 @@ async def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21993,12 +21855,9 @@ async def start_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22028,7 +21887,7 @@ async def start_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22058,12 +21917,9 @@ async def stop_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22093,7 +21949,7 @@ async def stop_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23523,11 +23379,8 @@ async def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23573,7 +23426,7 @@ async def _create_ms_deploy_operation_slot_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23747,12 +23600,9 @@ async def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23781,7 +23631,7 @@ async def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23819,12 +23669,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23876,7 +23723,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23969,12 +23816,9 @@ async def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24004,7 +23848,7 @@ async def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24257,12 +24101,9 @@ async def delete_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24292,7 +24133,7 @@ async def delete_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24487,12 +24328,9 @@ async def delete_function_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24523,7 +24361,7 @@ async def delete_function_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25022,12 +24860,9 @@ async def delete_host_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25058,7 +24893,7 @@ async def delete_host_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25698,12 +25533,9 @@ async def delete_hybrid_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25734,7 +25566,7 @@ async def delete_hybrid_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26281,12 +26113,9 @@ async def delete_relay_service_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26316,7 +26145,7 @@ async def delete_relay_service_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26719,11 +26548,8 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26770,7 +26596,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26956,12 +26782,9 @@ async def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26991,7 +26814,7 @@ async def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27034,12 +26857,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27092,7 +26912,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27127,12 +26947,9 @@ async def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27163,7 +26980,7 @@ async def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27202,12 +27019,9 @@ async def delete_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27238,7 +27052,7 @@ async def delete_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27272,12 +27086,9 @@ async def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27313,7 +27124,7 @@ async def get_instance_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27359,12 +27170,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27418,7 +27226,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27462,12 +27270,9 @@ async def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27499,7 +27304,7 @@ async def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27544,12 +27349,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27603,7 +27405,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28140,12 +27942,9 @@ async def delete_swift_virtual_network_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28174,7 +27973,7 @@ async def delete_swift_virtual_network_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28371,12 +28170,9 @@ async def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28406,7 +28202,7 @@ async def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30495,12 +30291,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30552,7 +30345,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30584,12 +30377,9 @@ async def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30619,7 +30409,7 @@ async def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30655,12 +30445,9 @@ async def delete_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30690,7 +30477,7 @@ async def delete_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30721,12 +30508,9 @@ async def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30761,7 +30545,7 @@ async def get_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30804,12 +30588,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30862,7 +30643,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30896,12 +30677,9 @@ async def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30932,7 +30710,7 @@ async def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30974,12 +30752,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31032,7 +30807,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32352,12 +32127,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32409,7 +32181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32440,12 +32212,9 @@ async def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32475,7 +32244,7 @@ async def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32494,10 +32263,6 @@ async def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32635,12 +32400,9 @@ async def delete_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32670,7 +32432,7 @@ async def delete_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33534,12 +33296,9 @@ async def delete_source_control_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33569,7 +33328,7 @@ async def delete_source_control_slot( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34264,12 +34023,9 @@ async def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34299,7 +34055,7 @@ async def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34402,12 +34158,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34460,7 +34213,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34494,12 +34247,9 @@ async def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34530,7 +34280,7 @@ async def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34564,12 +34314,9 @@ async def run_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34599,7 +34346,7 @@ async def run_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35020,12 +34767,9 @@ async def delete_vnet_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35055,7 +34799,7 @@ async def delete_vnet_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35253,12 +34997,9 @@ async def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35289,7 +35030,7 @@ async def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -36592,12 +36333,9 @@ async def delete_source_control( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -36626,7 +36364,7 @@ async def delete_source_control( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37277,12 +37015,9 @@ async def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37311,7 +37046,7 @@ async def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37407,12 +37142,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37464,7 +37196,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37495,12 +37227,9 @@ async def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37530,7 +37259,7 @@ async def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37561,12 +37290,9 @@ async def run_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37595,7 +37321,7 @@ async def run_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37986,12 +37712,9 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38020,7 +37743,7 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38202,12 +37925,9 @@ async def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38237,7 +37957,7 @@ async def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39098,12 +38818,9 @@ async def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39133,7 +38850,7 @@ async def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39312,12 +39029,9 @@ async def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39346,7 +39060,7 @@ async def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/models/_models_py3.py index a66c66ac52a4..4929e756a5a4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/models/_models_py3.py @@ -16782,8 +16782,8 @@ class RampUpRule(_serialization.Model): :code:`ActionHostName`. :vartype reroute_percentage: float :ivar change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in @@ -16838,8 +16838,8 @@ def __init__( :code:`ActionHostName`. :paramtype reroute_percentage: float :keyword change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_app_service_plans_operations.py index 81e7e43449a1..778dd0807c70 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_app_service_plans_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1301,12 +1301,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1334,7 +1331,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2603,12 +2600,9 @@ def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2637,7 +2631,7 @@ def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2952,12 +2946,9 @@ def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2987,7 +2978,7 @@ def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3097,16 +3088,9 @@ def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3148,7 +3132,7 @@ def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3181,12 +3165,9 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3216,7 +3197,7 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3322,16 +3303,9 @@ def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3373,7 +3347,7 @@ def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_container_apps_operations.py index 902410565c17..4be6dd0e8992 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_container_apps_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -435,12 +435,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Con """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -468,7 +465,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Con response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_domains_operations.py index b197957131d5..bdb0db5363b1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2118,10 +2118,6 @@ def transfer_out(self, resource_group_name: str, domain_name: str, **kwargs: Any 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_web_apps_operations.py index f08f06f132c0..935dd27ad3bd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/operations/_web_apps_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -16754,12 +16754,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16787,7 +16784,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17020,12 +17017,9 @@ def delete( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17055,7 +17049,7 @@ def delete( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17694,12 +17688,9 @@ def delete_backup( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17728,7 +17719,7 @@ def delete_backup( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21874,12 +21865,9 @@ def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -21908,7 +21896,7 @@ def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21997,12 +21985,9 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22031,7 +22016,7 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22058,12 +22043,9 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22092,7 +22074,7 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23410,11 +23392,8 @@ def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23459,7 +23438,7 @@ def _create_ms_deploy_operation_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23611,12 +23590,9 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23644,7 +23620,7 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23794,12 +23770,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23850,7 +23823,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23935,12 +23908,9 @@ def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23969,7 +23939,7 @@ def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24208,12 +24178,9 @@ def delete_function( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24242,7 +24209,7 @@ def delete_function( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24425,12 +24392,9 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24460,7 +24424,7 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24934,12 +24898,9 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24969,7 +24930,7 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25568,12 +25529,9 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25603,7 +25561,7 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26111,12 +26069,9 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26145,7 +26100,7 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26521,11 +26476,8 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26571,7 +26523,7 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26741,12 +26693,9 @@ def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26775,7 +26724,7 @@ def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26815,12 +26764,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26872,7 +26818,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26904,12 +26850,9 @@ def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26939,7 +26882,7 @@ def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26975,12 +26918,9 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27010,7 +26950,7 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27041,12 +26981,9 @@ def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27081,7 +27018,7 @@ def get_instance_process_dump( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27123,12 +27060,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27181,7 +27115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27215,12 +27149,9 @@ def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27251,7 +27182,7 @@ def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27292,12 +27223,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27350,7 +27278,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28255,12 +28183,9 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28288,7 +28213,7 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28469,12 +28394,9 @@ def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28503,7 +28425,7 @@ def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30456,12 +30378,9 @@ def list_processes(self, resource_group_name: str, name: str, **kwargs: Any) -> error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30512,7 +30431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30539,12 +30458,9 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30573,7 +30489,7 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30606,12 +30522,9 @@ def delete_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30640,7 +30553,7 @@ def delete_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30666,12 +30579,9 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30705,7 +30615,7 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30744,12 +30654,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30801,7 +30708,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30832,12 +30739,9 @@ def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30867,7 +30771,7 @@ def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30905,12 +30809,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30962,7 +30863,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32177,12 +32078,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32233,7 +32131,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32261,12 +32159,9 @@ def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32295,7 +32190,7 @@ def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32314,10 +32209,6 @@ def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32446,12 +32337,9 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32480,7 +32368,7 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32589,12 +32477,9 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32623,7 +32508,7 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32883,12 +32768,9 @@ def delete_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32919,7 +32801,7 @@ def delete_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33618,12 +33500,9 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33653,7 +33532,7 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37920,12 +37799,9 @@ def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37955,7 +37831,7 @@ def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38051,12 +37927,9 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38086,7 +37959,7 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38116,12 +37989,9 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38151,7 +38021,7 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39579,11 +39449,8 @@ def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39629,7 +39496,7 @@ def _create_ms_deploy_operation_slot_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39803,12 +39670,9 @@ def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39837,7 +39701,7 @@ def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39874,12 +39738,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39931,7 +39792,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40022,12 +39883,9 @@ def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40057,7 +39915,7 @@ def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40310,12 +40168,9 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40345,7 +40200,7 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40540,12 +40395,9 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40576,7 +40428,7 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41077,12 +40929,9 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41113,7 +40962,7 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41752,12 +41601,9 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41788,7 +41634,7 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -42335,12 +42181,9 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -42370,7 +42213,7 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -42772,11 +42615,8 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -42823,7 +42663,7 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43009,12 +42849,9 @@ def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43044,7 +42881,7 @@ def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43087,12 +42924,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43145,7 +42979,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43180,12 +43014,9 @@ def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43216,7 +43047,7 @@ def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43255,12 +43086,9 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43291,7 +43119,7 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43325,12 +43153,9 @@ def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43366,7 +43191,7 @@ def get_instance_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43411,12 +43236,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43470,7 +43292,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43514,12 +43336,9 @@ def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43551,7 +43370,7 @@ def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43595,12 +43414,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43654,7 +43470,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44191,12 +44007,9 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44225,7 +44038,7 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44422,12 +44235,9 @@ def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44457,7 +44267,7 @@ def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46540,12 +46350,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46597,7 +46404,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46629,12 +46436,9 @@ def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46664,7 +46468,7 @@ def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46700,12 +46504,9 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46735,7 +46536,7 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46766,12 +46567,9 @@ def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46806,7 +46604,7 @@ def get_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46848,12 +46646,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46906,7 +46701,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46940,12 +46735,9 @@ def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46976,7 +46768,7 @@ def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47017,12 +46809,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47075,7 +46864,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48393,12 +48182,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48450,7 +48236,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48481,12 +48267,9 @@ def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48516,7 +48299,7 @@ def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48535,10 +48318,6 @@ def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48675,12 +48454,9 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48710,7 +48486,7 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -49568,12 +49344,9 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49603,7 +49376,7 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50306,12 +50079,9 @@ def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50341,7 +50111,7 @@ def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50443,12 +50213,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50501,7 +50268,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50535,12 +50302,9 @@ def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50571,7 +50335,7 @@ def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50605,12 +50369,9 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50640,7 +50401,7 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51060,12 +50821,9 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51095,7 +50853,7 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51293,12 +51051,9 @@ def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51329,7 +51084,7 @@ def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -52626,12 +52381,9 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -52660,7 +52412,7 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53319,12 +53071,9 @@ def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53353,7 +53102,7 @@ def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53448,12 +53197,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53505,7 +53251,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53536,12 +53282,9 @@ def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53571,7 +53314,7 @@ def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53602,12 +53345,9 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53636,7 +53376,7 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54028,12 +53768,9 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54062,7 +53799,7 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54244,12 +53981,9 @@ def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54279,7 +54013,7 @@ def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55137,12 +54871,9 @@ def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55172,7 +54903,7 @@ def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55350,12 +55081,9 @@ def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55384,7 +55112,7 @@ def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/_version.py index 142a0420b39b..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_app_service_plans_operations.py index 2b81417cde4c..612da543f25d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_app_service_plans_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -287,12 +273,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -320,7 +303,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1589,12 +1572,9 @@ async def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1623,7 +1603,7 @@ async def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1938,12 +1918,9 @@ async def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1973,7 +1950,7 @@ async def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2083,16 +2060,9 @@ async def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2134,7 +2104,7 @@ async def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2167,12 +2137,9 @@ async def delete_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2202,7 +2169,7 @@ async def delete_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2308,16 +2275,9 @@ async def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2359,7 +2319,7 @@ async def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_container_apps_operations.py index e3866fb87788..b9f54e74bde7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_container_apps_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -243,12 +243,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -276,7 +273,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_domains_operations.py index fe62f700a297..1aedd68100fd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -1552,10 +1552,6 @@ async def transfer_out(self, resource_group_name: str, domain_name: str, **kwarg 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_web_apps_operations.py index 978990a3fc38..b9b7ae09b9e9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/aio/operations/_web_apps_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -665,12 +651,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -698,7 +681,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -931,12 +914,9 @@ async def delete( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -966,7 +946,7 @@ async def delete( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1603,12 +1583,9 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1637,7 +1614,7 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5794,12 +5771,9 @@ async def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5828,7 +5802,7 @@ async def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5917,12 +5891,9 @@ async def start_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5951,7 +5922,7 @@ async def start_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5978,12 +5949,9 @@ async def stop_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -6012,7 +5980,7 @@ async def stop_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7334,11 +7302,8 @@ async def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7383,7 +7348,7 @@ async def _create_ms_deploy_operation_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7535,12 +7500,9 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7568,7 +7530,7 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7719,12 +7681,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7775,7 +7734,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7860,12 +7819,9 @@ async def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7894,7 +7850,7 @@ async def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8131,12 +8087,9 @@ async def delete_function(self, resource_group_name: str, name: str, function_na """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8165,7 +8118,7 @@ async def delete_function(self, resource_group_name: str, name: str, function_na response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8348,12 +8301,9 @@ async def delete_function_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8383,7 +8333,7 @@ async def delete_function_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8853,12 +8803,9 @@ async def delete_host_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8888,7 +8835,7 @@ async def delete_host_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9488,12 +9435,9 @@ async def delete_hybrid_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -9523,7 +9467,7 @@ async def delete_hybrid_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10033,12 +9977,9 @@ async def delete_relay_service_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10067,7 +10008,7 @@ async def delete_relay_service_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10444,11 +10385,8 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10494,7 +10432,7 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10664,12 +10602,9 @@ async def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10698,7 +10633,7 @@ async def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10738,12 +10673,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10795,7 +10727,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10827,12 +10759,9 @@ async def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10862,7 +10791,7 @@ async def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10898,12 +10827,9 @@ async def delete_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10933,7 +10859,7 @@ async def delete_instance_process( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10964,12 +10890,9 @@ async def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11004,7 +10927,7 @@ async def get_instance_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11047,12 +10970,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11105,7 +11025,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11139,12 +11059,9 @@ async def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11175,7 +11092,7 @@ async def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11217,12 +11134,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11275,7 +11189,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12183,12 +12097,9 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12216,7 +12127,7 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12397,12 +12308,9 @@ async def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12431,7 +12339,7 @@ async def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14388,12 +14296,9 @@ def list_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14444,7 +14349,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14473,12 +14378,9 @@ async def get_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14507,7 +14409,7 @@ async def get_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14538,12 +14440,9 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14572,7 +14471,7 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14600,12 +14499,9 @@ async def get_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14639,7 +14535,7 @@ async def get_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14679,12 +14575,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14736,7 +14629,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14767,12 +14660,9 @@ async def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14802,7 +14692,7 @@ async def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14841,12 +14731,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14898,7 +14785,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16113,12 +16000,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16169,7 +16053,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16197,12 +16081,9 @@ async def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16231,7 +16112,7 @@ async def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16250,10 +16131,6 @@ async def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16383,12 +16260,9 @@ async def delete_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16417,7 +16291,7 @@ async def delete_site_extension( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16526,12 +16400,9 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16560,7 +16431,7 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16820,12 +16691,9 @@ async def delete_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16856,7 +16724,7 @@ async def delete_slot( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17555,12 +17423,9 @@ async def delete_backup_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17590,7 +17455,7 @@ async def delete_backup_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21862,12 +21727,9 @@ async def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -21897,7 +21759,7 @@ async def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21993,12 +21855,9 @@ async def start_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22028,7 +21887,7 @@ async def start_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22058,12 +21917,9 @@ async def stop_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22093,7 +21949,7 @@ async def stop_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23523,11 +23379,8 @@ async def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23573,7 +23426,7 @@ async def _create_ms_deploy_operation_slot_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23747,12 +23600,9 @@ async def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23781,7 +23631,7 @@ async def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23819,12 +23669,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23876,7 +23723,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23969,12 +23816,9 @@ async def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24004,7 +23848,7 @@ async def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24257,12 +24101,9 @@ async def delete_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24292,7 +24133,7 @@ async def delete_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24487,12 +24328,9 @@ async def delete_function_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24523,7 +24361,7 @@ async def delete_function_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25022,12 +24860,9 @@ async def delete_host_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25058,7 +24893,7 @@ async def delete_host_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25698,12 +25533,9 @@ async def delete_hybrid_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25734,7 +25566,7 @@ async def delete_hybrid_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26281,12 +26113,9 @@ async def delete_relay_service_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26316,7 +26145,7 @@ async def delete_relay_service_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26719,11 +26548,8 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26770,7 +26596,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26956,12 +26782,9 @@ async def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26991,7 +26814,7 @@ async def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27034,12 +26857,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27092,7 +26912,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27127,12 +26947,9 @@ async def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27163,7 +26980,7 @@ async def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27202,12 +27019,9 @@ async def delete_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27238,7 +27052,7 @@ async def delete_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27272,12 +27086,9 @@ async def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27313,7 +27124,7 @@ async def get_instance_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27359,12 +27170,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27418,7 +27226,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27462,12 +27270,9 @@ async def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27499,7 +27304,7 @@ async def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27544,12 +27349,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27603,7 +27405,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28140,12 +27942,9 @@ async def delete_swift_virtual_network_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28174,7 +27973,7 @@ async def delete_swift_virtual_network_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28371,12 +28170,9 @@ async def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28406,7 +28202,7 @@ async def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30495,12 +30291,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30552,7 +30345,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30584,12 +30377,9 @@ async def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30619,7 +30409,7 @@ async def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30655,12 +30445,9 @@ async def delete_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30690,7 +30477,7 @@ async def delete_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30721,12 +30508,9 @@ async def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30761,7 +30545,7 @@ async def get_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30804,12 +30588,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30862,7 +30643,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30896,12 +30677,9 @@ async def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30932,7 +30710,7 @@ async def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30974,12 +30752,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31032,7 +30807,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32352,12 +32127,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32409,7 +32181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32440,12 +32212,9 @@ async def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32475,7 +32244,7 @@ async def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32494,10 +32263,6 @@ async def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32635,12 +32400,9 @@ async def delete_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32670,7 +32432,7 @@ async def delete_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33534,12 +33296,9 @@ async def delete_source_control_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33569,7 +33328,7 @@ async def delete_source_control_slot( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34264,12 +34023,9 @@ async def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34299,7 +34055,7 @@ async def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34402,12 +34158,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34460,7 +34213,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34494,12 +34247,9 @@ async def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34530,7 +34280,7 @@ async def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34564,12 +34314,9 @@ async def run_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34599,7 +34346,7 @@ async def run_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35020,12 +34767,9 @@ async def delete_vnet_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35055,7 +34799,7 @@ async def delete_vnet_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35253,12 +34997,9 @@ async def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35289,7 +35030,7 @@ async def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -36592,12 +36333,9 @@ async def delete_source_control( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -36626,7 +36364,7 @@ async def delete_source_control( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37277,12 +37015,9 @@ async def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37311,7 +37046,7 @@ async def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37407,12 +37142,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37464,7 +37196,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37495,12 +37227,9 @@ async def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37530,7 +37259,7 @@ async def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37561,12 +37290,9 @@ async def run_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37595,7 +37321,7 @@ async def run_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37986,12 +37712,9 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38020,7 +37743,7 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38202,12 +37925,9 @@ async def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38237,7 +37957,7 @@ async def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39098,12 +38818,9 @@ async def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39133,7 +38850,7 @@ async def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39312,12 +39029,9 @@ async def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39346,7 +39060,7 @@ async def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/models/_models_py3.py index c40a615f7591..22a291c30d40 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/models/_models_py3.py @@ -16963,8 +16963,8 @@ class RampUpRule(_serialization.Model): :code:`ActionHostName`. :vartype reroute_percentage: float :ivar change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in @@ -17019,8 +17019,8 @@ def __init__( :code:`ActionHostName`. :paramtype reroute_percentage: float :keyword change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_app_service_plans_operations.py index 4621c65826fc..95d540901176 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_app_service_plans_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1301,12 +1301,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1334,7 +1331,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2603,12 +2600,9 @@ def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2637,7 +2631,7 @@ def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2952,12 +2946,9 @@ def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2987,7 +2978,7 @@ def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3097,16 +3088,9 @@ def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3148,7 +3132,7 @@ def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3181,12 +3165,9 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3216,7 +3197,7 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3322,16 +3303,9 @@ def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3373,7 +3347,7 @@ def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_container_apps_operations.py index 8e04ee7f9381..dda876004c3a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_container_apps_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -435,12 +435,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Con """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -468,7 +465,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Con response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_domains_operations.py index 69580a5e98f5..14c8124bcf34 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2118,10 +2118,6 @@ def transfer_out(self, resource_group_name: str, domain_name: str, **kwargs: Any 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_web_apps_operations.py index 64ddd1942393..ce0c936d2a48 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2023_01_01/operations/_web_apps_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -16754,12 +16754,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16787,7 +16784,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17020,12 +17017,9 @@ def delete( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17055,7 +17049,7 @@ def delete( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17694,12 +17688,9 @@ def delete_backup( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17728,7 +17719,7 @@ def delete_backup( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21874,12 +21865,9 @@ def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -21908,7 +21896,7 @@ def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21997,12 +21985,9 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22031,7 +22016,7 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22058,12 +22043,9 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22092,7 +22074,7 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23410,11 +23392,8 @@ def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23459,7 +23438,7 @@ def _create_ms_deploy_operation_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23611,12 +23590,9 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23644,7 +23620,7 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23794,12 +23770,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23850,7 +23823,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23935,12 +23908,9 @@ def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23969,7 +23939,7 @@ def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24208,12 +24178,9 @@ def delete_function( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24242,7 +24209,7 @@ def delete_function( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24425,12 +24392,9 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24460,7 +24424,7 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24934,12 +24898,9 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24969,7 +24930,7 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25568,12 +25529,9 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25603,7 +25561,7 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26111,12 +26069,9 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26145,7 +26100,7 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26521,11 +26476,8 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26571,7 +26523,7 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26741,12 +26693,9 @@ def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26775,7 +26724,7 @@ def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26815,12 +26764,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26872,7 +26818,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26904,12 +26850,9 @@ def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26939,7 +26882,7 @@ def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26975,12 +26918,9 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27010,7 +26950,7 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27041,12 +26981,9 @@ def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27081,7 +27018,7 @@ def get_instance_process_dump( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27123,12 +27060,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27181,7 +27115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27215,12 +27149,9 @@ def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27251,7 +27182,7 @@ def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27292,12 +27223,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27350,7 +27278,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28255,12 +28183,9 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28288,7 +28213,7 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28469,12 +28394,9 @@ def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28503,7 +28425,7 @@ def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30456,12 +30378,9 @@ def list_processes(self, resource_group_name: str, name: str, **kwargs: Any) -> error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30512,7 +30431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30539,12 +30458,9 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30573,7 +30489,7 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30606,12 +30522,9 @@ def delete_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30640,7 +30553,7 @@ def delete_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30666,12 +30579,9 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30705,7 +30615,7 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30744,12 +30654,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30801,7 +30708,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30832,12 +30739,9 @@ def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30867,7 +30771,7 @@ def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30905,12 +30809,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30962,7 +30863,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32177,12 +32078,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32233,7 +32131,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32261,12 +32159,9 @@ def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32295,7 +32190,7 @@ def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32314,10 +32209,6 @@ def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32446,12 +32337,9 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32480,7 +32368,7 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32589,12 +32477,9 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32623,7 +32508,7 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32883,12 +32768,9 @@ def delete_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -32919,7 +32801,7 @@ def delete_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33618,12 +33500,9 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33653,7 +33532,7 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37920,12 +37799,9 @@ def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37955,7 +37831,7 @@ def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38051,12 +37927,9 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38086,7 +37959,7 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38116,12 +37989,9 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38151,7 +38021,7 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39579,11 +39449,8 @@ def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39629,7 +39496,7 @@ def _create_ms_deploy_operation_slot_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39803,12 +39670,9 @@ def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39837,7 +39701,7 @@ def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39874,12 +39738,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39931,7 +39792,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40022,12 +39883,9 @@ def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40057,7 +39915,7 @@ def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40310,12 +40168,9 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40345,7 +40200,7 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40540,12 +40395,9 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40576,7 +40428,7 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41077,12 +40929,9 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41113,7 +40962,7 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41752,12 +41601,9 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41788,7 +41634,7 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -42335,12 +42181,9 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -42370,7 +42213,7 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -42772,11 +42615,8 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -42823,7 +42663,7 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43009,12 +42849,9 @@ def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43044,7 +42881,7 @@ def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43087,12 +42924,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43145,7 +42979,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43180,12 +43014,9 @@ def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43216,7 +43047,7 @@ def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43255,12 +43086,9 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43291,7 +43119,7 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43325,12 +43153,9 @@ def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43366,7 +43191,7 @@ def get_instance_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43411,12 +43236,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43470,7 +43292,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43514,12 +43336,9 @@ def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43551,7 +43370,7 @@ def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43595,12 +43414,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43654,7 +43470,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44191,12 +44007,9 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44225,7 +44038,7 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44422,12 +44235,9 @@ def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44457,7 +44267,7 @@ def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46540,12 +46350,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46597,7 +46404,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46629,12 +46436,9 @@ def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46664,7 +46468,7 @@ def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46700,12 +46504,9 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46735,7 +46536,7 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46766,12 +46567,9 @@ def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46806,7 +46604,7 @@ def get_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46848,12 +46646,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46906,7 +46701,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -46940,12 +46735,9 @@ def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -46976,7 +46768,7 @@ def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47017,12 +46809,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47075,7 +46864,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48393,12 +48182,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48450,7 +48236,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48481,12 +48267,9 @@ def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48516,7 +48299,7 @@ def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -48535,10 +48318,6 @@ def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48675,12 +48454,9 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -48710,7 +48486,7 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -49568,12 +49344,9 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49603,7 +49376,7 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50306,12 +50079,9 @@ def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50341,7 +50111,7 @@ def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50443,12 +50213,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50501,7 +50268,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50535,12 +50302,9 @@ def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50571,7 +50335,7 @@ def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50605,12 +50369,9 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50640,7 +50401,7 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51060,12 +50821,9 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51095,7 +50853,7 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51293,12 +51051,9 @@ def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51329,7 +51084,7 @@ def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -52626,12 +52381,9 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -52660,7 +52412,7 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53319,12 +53071,9 @@ def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53353,7 +53102,7 @@ def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53448,12 +53197,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53505,7 +53251,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53536,12 +53282,9 @@ def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53571,7 +53314,7 @@ def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53602,12 +53345,9 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53636,7 +53376,7 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54028,12 +53768,9 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54062,7 +53799,7 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54244,12 +53981,9 @@ def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54279,7 +54013,7 @@ def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55137,12 +54871,9 @@ def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55172,7 +54903,7 @@ def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55350,12 +55081,9 @@ def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55384,7 +55112,7 @@ def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_metadata.json index 4019c957df92..ca3fd73860f0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_metadata.json @@ -114,8 +114,6 @@ "app_service_environments": "AppServiceEnvironmentsOperations", "app_service_plans": "AppServicePlansOperations", "certificates": "CertificatesOperations", - "container_apps": "ContainerAppsOperations", - "container_apps_revisions": "ContainerAppsRevisionsOperations", "deleted_web_apps": "DeletedWebAppsOperations", "diagnostics": "DiagnosticsOperations", "global_operations": "GlobalOperations", diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_version.py index 142a0420b39b..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_web_site_management_client.py index 32b257543ac9..fd4e351a20f0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/_web_site_management_client.py @@ -25,8 +25,6 @@ CertificateOrdersDiagnosticsOperations, CertificateRegistrationProviderOperations, CertificatesOperations, - ContainerAppsOperations, - ContainerAppsRevisionsOperations, DeletedWebAppsOperations, DiagnosticsOperations, DomainRegistrationProviderOperations, @@ -82,11 +80,6 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint :vartype app_service_plans: azure.mgmt.web.v2024_04_01.operations.AppServicePlansOperations :ivar certificates: CertificatesOperations operations :vartype certificates: azure.mgmt.web.v2024_04_01.operations.CertificatesOperations - :ivar container_apps: ContainerAppsOperations operations - :vartype container_apps: azure.mgmt.web.v2024_04_01.operations.ContainerAppsOperations - :ivar container_apps_revisions: ContainerAppsRevisionsOperations operations - :vartype container_apps_revisions: - azure.mgmt.web.v2024_04_01.operations.ContainerAppsRevisionsOperations :ivar deleted_web_apps: DeletedWebAppsOperations operations :vartype deleted_web_apps: azure.mgmt.web.v2024_04_01.operations.DeletedWebAppsOperations :ivar diagnostics: DiagnosticsOperations operations @@ -207,12 +200,6 @@ def __init__( self.certificates = CertificatesOperations( self._client, self._config, self._serialize, self._deserialize, "2024-04-01" ) - self.container_apps = ContainerAppsOperations( - self._client, self._config, self._serialize, self._deserialize, "2024-04-01" - ) - self.container_apps_revisions = ContainerAppsRevisionsOperations( - self._client, self._config, self._serialize, self._deserialize, "2024-04-01" - ) self.deleted_web_apps = DeletedWebAppsOperations( self._client, self._config, self._serialize, self._deserialize, "2024-04-01" ) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/_web_site_management_client.py index 1496fd28078d..9a781e011051 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/_web_site_management_client.py @@ -25,8 +25,6 @@ CertificateOrdersDiagnosticsOperations, CertificateRegistrationProviderOperations, CertificatesOperations, - ContainerAppsOperations, - ContainerAppsRevisionsOperations, DeletedWebAppsOperations, DiagnosticsOperations, DomainRegistrationProviderOperations, @@ -82,11 +80,6 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint :vartype app_service_plans: azure.mgmt.web.v2024_04_01.aio.operations.AppServicePlansOperations :ivar certificates: CertificatesOperations operations :vartype certificates: azure.mgmt.web.v2024_04_01.aio.operations.CertificatesOperations - :ivar container_apps: ContainerAppsOperations operations - :vartype container_apps: azure.mgmt.web.v2024_04_01.aio.operations.ContainerAppsOperations - :ivar container_apps_revisions: ContainerAppsRevisionsOperations operations - :vartype container_apps_revisions: - azure.mgmt.web.v2024_04_01.aio.operations.ContainerAppsRevisionsOperations :ivar deleted_web_apps: DeletedWebAppsOperations operations :vartype deleted_web_apps: azure.mgmt.web.v2024_04_01.aio.operations.DeletedWebAppsOperations :ivar diagnostics: DiagnosticsOperations operations @@ -210,12 +203,6 @@ def __init__( self.certificates = CertificatesOperations( self._client, self._config, self._serialize, self._deserialize, "2024-04-01" ) - self.container_apps = ContainerAppsOperations( - self._client, self._config, self._serialize, self._deserialize, "2024-04-01" - ) - self.container_apps_revisions = ContainerAppsRevisionsOperations( - self._client, self._config, self._serialize, self._deserialize, "2024-04-01" - ) self.deleted_web_apps = DeletedWebAppsOperations( self._client, self._config, self._serialize, self._deserialize, "2024-04-01" ) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/__init__.py index df7c598a3db9..45ff9a2a4fd8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/__init__.py @@ -21,8 +21,6 @@ from ._app_service_environments_operations import AppServiceEnvironmentsOperations # type: ignore from ._app_service_plans_operations import AppServicePlansOperations # type: ignore from ._certificates_operations import CertificatesOperations # type: ignore -from ._container_apps_operations import ContainerAppsOperations # type: ignore -from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations # type: ignore from ._deleted_web_apps_operations import DeletedWebAppsOperations # type: ignore from ._diagnostics_operations import DiagnosticsOperations # type: ignore from ._global_operations_operations import GlobalOperations # type: ignore @@ -58,8 +56,6 @@ "AppServiceEnvironmentsOperations", "AppServicePlansOperations", "CertificatesOperations", - "ContainerAppsOperations", - "ContainerAppsRevisionsOperations", "DeletedWebAppsOperations", "DiagnosticsOperations", "GlobalOperations", diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_app_service_plans_operations.py index 93e8187ef64a..6b8130582799 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_app_service_plans_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -287,12 +273,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -320,7 +303,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1589,12 +1572,9 @@ async def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1623,7 +1603,7 @@ async def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1938,12 +1918,9 @@ async def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1973,7 +1950,7 @@ async def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2083,16 +2060,9 @@ async def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2134,7 +2104,7 @@ async def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2167,12 +2137,9 @@ async def delete_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2202,7 +2169,7 @@ async def delete_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2308,16 +2275,9 @@ async def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2359,7 +2319,7 @@ async def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_operations.py deleted file mode 100644 index e4d035925685..000000000000 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_operations.py +++ /dev/null @@ -1,640 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._container_apps_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_list_secrets_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ContainerAppsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.web.v2024_04_01.aio.WebSiteManagementClient`'s - :attr:`container_apps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ContainerApp"]: - """Get the Container Apps in a given subscription. - - Get the Container Apps in a given subscription. - - :return: An iterator like instance of either ContainerApp or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :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 "2024-04-01")) - cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerAppCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.ContainerApp"]: - """Get the Container Apps in a given resource group. - - Get the Container Apps in a given resource group. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :return: An iterator like instance of either ContainerApp or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :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 "2024-04-01")) - cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerAppCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.ContainerApp: - """Get the properties of a Container App. - - Get the properties of a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :return: ContainerApp or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.ContainerApp - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), - } - 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 "2024-04-01")) - cls: ClsType[_models.ContainerApp] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ContainerApp", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - container_app_envelope: Union[_models.ContainerApp, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _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", self._api_version or "2024-04-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(container_app_envelope, (IOBase, bytes)): - _content = container_app_envelope - else: - _json = self._serialize.body(container_app_envelope, "ContainerApp") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: _models.ContainerApp, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Required. - :type container_app_envelope: ~azure.mgmt.web.v2024_04_01.models.ContainerApp - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Required. - :type container_app_envelope: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: Union[_models.ContainerApp, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Is either a ContainerApp type or a IO[bytes] type. Required. - :type container_app_envelope: ~azure.mgmt.web.v2024_04_01.models.ContainerApp or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._api_version or "2024-04-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContainerApp] = 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._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - container_app_envelope=container_app_envelope, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ContainerApp", pipeline_response.http_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.ContainerApp].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ContainerApp]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Delete a Container App. - - Description for Delete a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :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 "2024-04-01")) - cls: ClsType[None] = 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._delete_initial( - resource_group_name=resource_group_name, - name=name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - 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[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def list_secrets(self, name: str, **kwargs: Any) -> _models.SecretsCollection: - """List secrets for a container app. - - List secrets for a container app. - - :param name: Name of the Container App. Required. - :type name: str - :return: SecretsCollection or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.SecretsCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[_models.SecretsCollection] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SecretsCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_revisions_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_revisions_operations.py deleted file mode 100644 index 533dbb03746a..000000000000 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_container_apps_revisions_operations.py +++ /dev/null @@ -1,384 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._container_apps_revisions_operations import ( - build_activate_revision_request, - build_deactivate_revision_request, - build_get_revision_request, - build_list_revisions_request, - build_restart_revision_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ContainerAppsRevisionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.web.v2024_04_01.aio.WebSiteManagementClient`'s - :attr:`container_apps_revisions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") - - @distributed_trace - def list_revisions( - self, resource_group_name: str, container_app_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Revision"]: - """Get the Revisions for a given Container App. - - Get the Revisions for a given Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App for which Revisions are needed. Required. - :type container_app_name: str - :return: An iterator like instance of either Revision or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2024_04_01.models.Revision] - :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 "2024-04-01")) - cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_revisions_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_revision( - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> _models.Revision: - """Get a revision of a Container App. - - Get a revision of a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision. Required. - :type name: str - :return: Revision or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.Revision - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[_models.Revision] = kwargs.pop("cls", None) - - _request = build_get_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Revision", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def activate_revision( - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Activates a revision for a Container App. - - Activates a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to activate. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_activate_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def deactivate_revision( - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Deactivates a revision for a Container App. - - Deactivates a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to deactivate. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_deactivate_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def restart_revision( - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Restarts a revision for a Container App. - - Restarts a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to restart. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_restart_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_domains_operations.py index 8a4ed4945aae..eb6b30056f25 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -1552,10 +1552,6 @@ async def transfer_out(self, resource_group_name: str, domain_name: str, **kwarg 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_web_apps_operations.py index 6904566f03d2..cf1e73f5c728 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/aio/operations/_web_apps_operations.py @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -674,12 +660,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -707,7 +690,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -940,12 +923,9 @@ async def delete( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -975,7 +955,7 @@ async def delete( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1612,12 +1592,9 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1646,7 +1623,7 @@ async def delete_backup(self, resource_group_name: str, name: str, backup_id: st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5803,12 +5780,9 @@ async def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5837,7 +5811,7 @@ async def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5926,12 +5900,9 @@ async def start_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -5960,7 +5931,7 @@ async def start_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5987,12 +5958,9 @@ async def stop_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -6021,7 +5989,7 @@ async def stop_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7343,11 +7311,8 @@ async def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7392,7 +7357,7 @@ async def _create_ms_deploy_operation_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7544,12 +7509,9 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7577,7 +7539,7 @@ async def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7728,12 +7690,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7784,7 +7743,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7869,12 +7828,9 @@ async def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -7903,7 +7859,7 @@ async def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8140,12 +8096,9 @@ async def delete_function(self, resource_group_name: str, name: str, function_na """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8174,7 +8127,7 @@ async def delete_function(self, resource_group_name: str, name: str, function_na response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8357,12 +8310,9 @@ async def delete_function_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8392,7 +8342,7 @@ async def delete_function_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8862,12 +8812,9 @@ async def delete_host_secret( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -8897,7 +8844,7 @@ async def delete_host_secret( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9497,12 +9444,9 @@ async def delete_hybrid_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -9532,7 +9476,7 @@ async def delete_hybrid_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10042,12 +9986,9 @@ async def delete_relay_service_connection( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10076,7 +10017,7 @@ async def delete_relay_service_connection( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10453,11 +10394,8 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10503,7 +10441,7 @@ async def _create_instance_ms_deploy_operation_initial( # pylint: disable=name- await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10673,12 +10611,9 @@ async def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10707,7 +10642,7 @@ async def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10747,12 +10682,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10804,7 +10736,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10836,12 +10768,9 @@ async def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10871,7 +10800,7 @@ async def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10907,12 +10836,9 @@ async def delete_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -10942,7 +10868,7 @@ async def delete_instance_process( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10973,12 +10899,9 @@ async def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11013,7 +10936,7 @@ async def get_instance_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11056,12 +10979,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11114,7 +11034,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11148,12 +11068,9 @@ async def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11184,7 +11101,7 @@ async def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11226,12 +11143,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -11284,7 +11198,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12249,12 +12163,9 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12282,7 +12193,7 @@ async def delete_swift_virtual_network(self, resource_group_name: str, name: str response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12463,12 +12374,9 @@ async def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -12497,7 +12405,7 @@ async def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14454,12 +14362,9 @@ def list_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14510,7 +14415,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14539,12 +14444,9 @@ async def get_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14573,7 +14475,7 @@ async def get_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14604,12 +14506,9 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14638,7 +14537,7 @@ async def delete_process(self, resource_group_name: str, name: str, process_id: response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14666,12 +14565,9 @@ async def get_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14705,7 +14601,7 @@ async def get_process_dump( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14745,12 +14641,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14802,7 +14695,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14833,12 +14726,9 @@ async def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14868,7 +14758,7 @@ async def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14907,12 +14797,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -14964,7 +14851,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16528,12 +16415,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16584,7 +16468,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16612,12 +16496,9 @@ async def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16646,7 +16527,7 @@ async def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16665,10 +16546,6 @@ async def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16798,12 +16675,9 @@ async def delete_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16832,7 +16706,7 @@ async def delete_site_extension( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16941,12 +16815,9 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -16975,7 +16846,7 @@ async def get_slot(self, resource_group_name: str, name: str, slot: str, **kwarg response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17235,12 +17106,9 @@ async def delete_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17271,7 +17139,7 @@ async def delete_slot( response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17970,12 +17838,9 @@ async def delete_backup_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -18005,7 +17870,7 @@ async def delete_backup_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22277,12 +22142,9 @@ async def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22312,7 +22174,7 @@ async def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22408,12 +22270,9 @@ async def start_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22443,7 +22302,7 @@ async def start_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22473,12 +22332,9 @@ async def stop_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22508,7 +22364,7 @@ async def stop_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23938,11 +23794,8 @@ async def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23988,7 +23841,7 @@ async def _create_ms_deploy_operation_slot_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24162,12 +24015,9 @@ async def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24196,7 +24046,7 @@ async def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24234,12 +24084,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24291,7 +24138,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24384,12 +24231,9 @@ async def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24419,7 +24263,7 @@ async def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24672,12 +24516,9 @@ async def delete_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24707,7 +24548,7 @@ async def delete_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24902,12 +24743,9 @@ async def delete_function_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24938,7 +24776,7 @@ async def delete_function_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25437,12 +25275,9 @@ async def delete_host_secret_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25473,7 +25308,7 @@ async def delete_host_secret_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26113,12 +25948,9 @@ async def delete_hybrid_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26149,7 +25981,7 @@ async def delete_hybrid_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26696,12 +26528,9 @@ async def delete_relay_service_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26731,7 +26560,7 @@ async def delete_relay_service_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27134,11 +26963,8 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27185,7 +27011,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable= await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27371,12 +27197,9 @@ async def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27406,7 +27229,7 @@ async def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27449,12 +27272,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27507,7 +27327,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27542,12 +27362,9 @@ async def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27578,7 +27395,7 @@ async def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27617,12 +27434,9 @@ async def delete_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27653,7 +27467,7 @@ async def delete_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27687,12 +27501,9 @@ async def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27728,7 +27539,7 @@ async def get_instance_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27774,12 +27585,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27833,7 +27641,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27877,12 +27685,9 @@ async def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27914,7 +27719,7 @@ async def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27959,12 +27764,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28018,7 +27820,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28555,12 +28357,9 @@ async def delete_swift_virtual_network_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28589,7 +28388,7 @@ async def delete_swift_virtual_network_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28786,12 +28585,9 @@ async def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28821,7 +28617,7 @@ async def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30910,12 +30706,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30967,7 +30760,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30999,12 +30792,9 @@ async def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31034,7 +30824,7 @@ async def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31070,12 +30860,9 @@ async def delete_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31105,7 +30892,7 @@ async def delete_process_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31136,12 +30923,9 @@ async def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31176,7 +30960,7 @@ async def get_process_dump_slot( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31219,12 +31003,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31277,7 +31058,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31311,12 +31092,9 @@ async def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31347,7 +31125,7 @@ async def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31389,12 +31167,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31447,7 +31222,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33141,12 +32916,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33198,7 +32970,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33229,12 +33001,9 @@ async def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33264,7 +33033,7 @@ async def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33283,10 +33052,6 @@ async def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33424,12 +33189,9 @@ async def delete_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33459,7 +33221,7 @@ async def delete_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34323,12 +34085,9 @@ async def delete_source_control_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34358,7 +34117,7 @@ async def delete_source_control_slot( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35053,12 +34812,9 @@ async def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35088,7 +34844,7 @@ async def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35191,12 +34947,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35249,7 +35002,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35283,12 +35036,9 @@ async def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35319,7 +35069,7 @@ async def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35353,12 +35103,9 @@ async def run_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35388,7 +35135,7 @@ async def run_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -35809,12 +35556,9 @@ async def delete_vnet_connection_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -35844,7 +35588,7 @@ async def delete_vnet_connection_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -36042,12 +35786,9 @@ async def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -36078,7 +35819,7 @@ async def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -37381,12 +37122,9 @@ async def delete_source_control( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -37415,7 +37153,7 @@ async def delete_source_control( 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38066,12 +37804,9 @@ async def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38100,7 +37835,7 @@ async def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38196,12 +37931,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38253,7 +37985,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38284,12 +38016,9 @@ async def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38319,7 +38048,7 @@ async def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38350,12 +38079,9 @@ async def run_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38384,7 +38110,7 @@ async def run_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38775,12 +38501,9 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38809,7 +38532,7 @@ async def delete_vnet_connection(self, resource_group_name: str, name: str, vnet response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38991,12 +38714,9 @@ async def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39026,7 +38746,7 @@ async def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -39887,12 +39607,9 @@ async def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -39922,7 +39639,7 @@ async def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40101,12 +39818,9 @@ async def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40135,7 +39849,7 @@ async def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/__init__.py index 31c747cd8c54..797d300ec836 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/__init__.py @@ -92,15 +92,11 @@ CipherSuites, ClientRegistration, CloningInfo, - Configuration, ConnStringInfo, ConnStringValueTypePair, ConnectionStringDictionary, Contact, Container, - ContainerApp, - ContainerAppCollection, - ContainerAppSecret, ContainerAppsConfiguration, ContainerCpuStatistics, ContainerCpuUsage, @@ -256,7 +252,6 @@ IdentityProviders, InboundEnvironmentEndpoint, InboundEnvironmentEndpointCollection, - Ingress, IpAddress, IpAddressRange, IpSecurityRestriction, @@ -341,7 +336,6 @@ RecurrenceSchedule, RecurrenceScheduleOccurrence, RegenerateActionParameter, - RegistryCredentials, ReissueCertificateOrderRequest, RelayServiceConnectionEntity, RemotePrivateEndpointConnection, @@ -370,16 +364,12 @@ ResponseMetaData, RestoreRequest, RetryHistory, - Revision, - RevisionCollection, RunActionCorrelation, RunCorrelation, SampleUtterance, Scale, ScaleRule, ScaleRuleAuth, - Secret, - SecretsCollection, ServiceSpecification, Site, SiteAuthSettings, @@ -472,7 +462,6 @@ TopLevelDomain, TopLevelDomainAgreementOption, TopLevelDomainCollection, - TrafficWeight, TriggeredJobHistory, TriggeredJobHistoryCollection, TriggeredJobRun, @@ -549,7 +538,6 @@ ) from ._web_site_management_client_enums import ( # type: ignore - ActiveRevisionsMode, AppServicePlanRestrictions, AuthType, AuthenticationType, @@ -573,7 +561,6 @@ CloneAbilityResult, ComputeModeOptions, ConnectionStringType, - ContainerAppProvisioningState, ContinuousWebJobStatus, CookieExpirationConvention, CustomDnsSuffixProvisioningState, @@ -601,7 +588,6 @@ HostingEnvironmentStatus, IPMode, InAvailabilityReasonType, - IngressTransportMethod, InsightStatus, IpFilterTag, IssueType, @@ -631,8 +617,6 @@ ResolveStatus, ResourceNotRenewableReason, ResourceScopeType, - RevisionHealthState, - RevisionProvisioningState, RouteType, RuntimeName, ScmType, @@ -748,15 +732,11 @@ "CipherSuites", "ClientRegistration", "CloningInfo", - "Configuration", "ConnStringInfo", "ConnStringValueTypePair", "ConnectionStringDictionary", "Contact", "Container", - "ContainerApp", - "ContainerAppCollection", - "ContainerAppSecret", "ContainerAppsConfiguration", "ContainerCpuStatistics", "ContainerCpuUsage", @@ -912,7 +892,6 @@ "IdentityProviders", "InboundEnvironmentEndpoint", "InboundEnvironmentEndpointCollection", - "Ingress", "IpAddress", "IpAddressRange", "IpSecurityRestriction", @@ -997,7 +976,6 @@ "RecurrenceSchedule", "RecurrenceScheduleOccurrence", "RegenerateActionParameter", - "RegistryCredentials", "ReissueCertificateOrderRequest", "RelayServiceConnectionEntity", "RemotePrivateEndpointConnection", @@ -1026,16 +1004,12 @@ "ResponseMetaData", "RestoreRequest", "RetryHistory", - "Revision", - "RevisionCollection", "RunActionCorrelation", "RunCorrelation", "SampleUtterance", "Scale", "ScaleRule", "ScaleRuleAuth", - "Secret", - "SecretsCollection", "ServiceSpecification", "Site", "SiteAuthSettings", @@ -1128,7 +1102,6 @@ "TopLevelDomain", "TopLevelDomainAgreementOption", "TopLevelDomainCollection", - "TrafficWeight", "TriggeredJobHistory", "TriggeredJobHistoryCollection", "TriggeredJobRun", @@ -1202,7 +1175,6 @@ "WorkflowTriggerRecurrence", "WorkflowVersion", "WorkflowVersionListResult", - "ActiveRevisionsMode", "AppServicePlanRestrictions", "AuthType", "AuthenticationType", @@ -1226,7 +1198,6 @@ "CloneAbilityResult", "ComputeModeOptions", "ConnectionStringType", - "ContainerAppProvisioningState", "ContinuousWebJobStatus", "CookieExpirationConvention", "CustomDnsSuffixProvisioningState", @@ -1254,7 +1225,6 @@ "HostingEnvironmentStatus", "IPMode", "InAvailabilityReasonType", - "IngressTransportMethod", "InsightStatus", "IpFilterTag", "IssueType", @@ -1284,8 +1254,6 @@ "ResolveStatus", "ResourceNotRenewableReason", "ResourceScopeType", - "RevisionHealthState", - "RevisionProvisioningState", "RouteType", "RuntimeName", "ScmType", diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_models_py3.py index f2f3806becf4..e245f7abac18 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_models_py3.py @@ -5260,71 +5260,6 @@ def __init__( self.traffic_manager_profile_name = traffic_manager_profile_name -class Configuration(_serialization.Model): - """Non versioned Container App configuration properties that define the mutable settings of a - Container app. - - :ivar secrets: Collection of secrets used by a Container app. - :vartype secrets: list[~azure.mgmt.web.v2024_04_01.models.Secret] - :ivar active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled for - the Container app: - - - .. raw:: html - - Multiple: multiple revisions can be active. If no value if provided, this is - the defaultSingle: Only one revision can be active at a time. Revision weights can - not be used in this mode. Known values are: "multiple" and "single". - :vartype active_revisions_mode: str or ~azure.mgmt.web.v2024_04_01.models.ActiveRevisionsMode - :ivar ingress: Ingress configurations. - :vartype ingress: ~azure.mgmt.web.v2024_04_01.models.Ingress - :ivar registries: Collection of private container registry credentials for containers used by - the Container app. - :vartype registries: list[~azure.mgmt.web.v2024_04_01.models.RegistryCredentials] - """ - - _attribute_map = { - "secrets": {"key": "secrets", "type": "[Secret]"}, - "active_revisions_mode": {"key": "activeRevisionsMode", "type": "str"}, - "ingress": {"key": "ingress", "type": "Ingress"}, - "registries": {"key": "registries", "type": "[RegistryCredentials]"}, - } - - def __init__( - self, - *, - secrets: Optional[List["_models.Secret"]] = None, - active_revisions_mode: Optional[Union[str, "_models.ActiveRevisionsMode"]] = None, - ingress: Optional["_models.Ingress"] = None, - registries: Optional[List["_models.RegistryCredentials"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword secrets: Collection of secrets used by a Container app. - :paramtype secrets: list[~azure.mgmt.web.v2024_04_01.models.Secret] - :keyword active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled - for the Container app: - - - .. raw:: html - - Multiple: multiple revisions can be active. If no value if provided, this is - the defaultSingle: Only one revision can be active at a time. Revision weights can - not be used in this mode. Known values are: "multiple" and "single". - :paramtype active_revisions_mode: str or ~azure.mgmt.web.v2024_04_01.models.ActiveRevisionsMode - :keyword ingress: Ingress configurations. - :paramtype ingress: ~azure.mgmt.web.v2024_04_01.models.Ingress - :keyword registries: Collection of private container registry credentials for containers used - by the Container app. - :paramtype registries: list[~azure.mgmt.web.v2024_04_01.models.RegistryCredentials] - """ - super().__init__(**kwargs) - self.secrets = secrets - self.active_revisions_mode = active_revisions_mode - self.ingress = ingress - self.registries = registries - - class ConnectionStringDictionary(ProxyOnlyResource): """String dictionary resource. @@ -5603,138 +5538,6 @@ def __init__( self.resources = resources -class ContainerApp(Resource): - """Container App. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource Name. - :vartype name: str - :ivar kind: Kind of resource. If the resource is an app, you can refer to - https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference # pylint: disable=line-too-long - for details supported values for kind. - :vartype kind: str - :ivar location: Resource Location. Required. - :vartype location: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar provisioning_state: Provisioning state of the Container App. Known values are: - "InProgress", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~azure.mgmt.web.v2024_04_01.models.ContainerAppProvisioningState - :ivar kube_environment_id: Resource ID of the Container App's KubeEnvironment. - :vartype kube_environment_id: str - :ivar latest_revision_name: Name of the latest revision of the Container App. - :vartype latest_revision_name: str - :ivar latest_revision_fqdn: Fully Qualified Domain Name of the latest revision of the Container - App. - :vartype latest_revision_fqdn: str - :ivar configuration: Non versioned Container App configuration properties. - :vartype configuration: ~azure.mgmt.web.v2024_04_01.models.Configuration - :ivar template: Container App versioned application definition. - :vartype template: ~azure.mgmt.web.v2024_04_01.models.Template - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "location": {"required": True}, - "type": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "latest_revision_name": {"readonly": True}, - "latest_revision_fqdn": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "kube_environment_id": {"key": "properties.kubeEnvironmentId", "type": "str"}, - "latest_revision_name": {"key": "properties.latestRevisionName", "type": "str"}, - "latest_revision_fqdn": {"key": "properties.latestRevisionFqdn", "type": "str"}, - "configuration": {"key": "properties.configuration", "type": "Configuration"}, - "template": {"key": "properties.template", "type": "Template"}, - } - - def __init__( - self, - *, - location: str, - kind: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - kube_environment_id: Optional[str] = None, - configuration: Optional["_models.Configuration"] = None, - template: Optional["_models.Template"] = None, - **kwargs: Any - ) -> None: - """ - :keyword kind: Kind of resource. If the resource is an app, you can refer to - https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference # pylint: disable=line-too-long - for details supported values for kind. - :paramtype kind: str - :keyword location: Resource Location. Required. - :paramtype location: str - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword kube_environment_id: Resource ID of the Container App's KubeEnvironment. - :paramtype kube_environment_id: str - :keyword configuration: Non versioned Container App configuration properties. - :paramtype configuration: ~azure.mgmt.web.v2024_04_01.models.Configuration - :keyword template: Container App versioned application definition. - :paramtype template: ~azure.mgmt.web.v2024_04_01.models.Template - """ - super().__init__(kind=kind, location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kube_environment_id = kube_environment_id - self.latest_revision_name = None - self.latest_revision_fqdn = None - self.configuration = configuration - self.template = template - - -class ContainerAppCollection(_serialization.Model): - """Container App collection ARM resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar value: Collection of resources. Required. - :vartype value: list[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :ivar next_link: Link to next page of resources. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ContainerApp]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: List["_models.ContainerApp"], **kwargs: Any) -> None: - """ - :keyword value: Collection of resources. Required. - :paramtype value: list[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - """ - super().__init__(**kwargs) - self.value = value - self.next_link = None - - class ContainerAppsConfiguration(_serialization.Model): """ContainerAppsConfiguration. @@ -5815,34 +5618,6 @@ def __init__( self.docker_bridge_cidr = docker_bridge_cidr -class ContainerAppSecret(_serialization.Model): - """Container App Secret. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Secret Name. - :vartype name: str - :ivar value: Secret Value. - :vartype value: str - """ - - _validation = { - "name": {"readonly": True}, - "value": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name = None - self.value = None - - class ContainerCpuStatistics(_serialization.Model): """ContainerCpuStatistics. @@ -11441,8 +11216,8 @@ class FunctionsDeploymentStorage(_serialization.Model): "blobContainer" :vartype type: str or ~azure.mgmt.web.v2024_04_01.models.FunctionsDeploymentStorageType :ivar value: Property to set the URL for the selected Azure Storage type. Example: For - blobContainer, the value could be - https://:code:``.blob.core.windows.net/:code:``. + blobContainer, the value could be https://\\ + :code:``.blob.core.windows.net/\\ :code:``. :vartype value: str :ivar authentication: Authentication method to access the storage account for deployment. :vartype authentication: @@ -11468,8 +11243,8 @@ def __init__( "blobContainer" :paramtype type: str or ~azure.mgmt.web.v2024_04_01.models.FunctionsDeploymentStorageType :keyword value: Property to set the URL for the selected Azure Storage type. Example: For - blobContainer, the value could be - https://:code:``.blob.core.windows.net/:code:``. + blobContainer, the value could be https://\\ + :code:``.blob.core.windows.net/\\ :code:``. :paramtype value: str :keyword authentication: Authentication method to access the storage account for deployment. :paramtype authentication: @@ -13198,71 +12973,6 @@ def __init__(self, *, value: List["_models.InboundEnvironmentEndpoint"], **kwarg self.next_link = None -class Ingress(_serialization.Model): - """Container App Ingress configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar fqdn: Hostname. - :vartype fqdn: str - :ivar external: Bool indicating if app exposes an external http endpoint. - :vartype external: bool - :ivar target_port: Target Port in containers for traffic from ingress. - :vartype target_port: int - :ivar transport: Ingress transport protocol. Known values are: "auto", "http", and "http2". - :vartype transport: str or ~azure.mgmt.web.v2024_04_01.models.IngressTransportMethod - :ivar traffic: - :vartype traffic: list[~azure.mgmt.web.v2024_04_01.models.TrafficWeight] - :ivar allow_insecure: Bool indicating if HTTP connections to is allowed. If set to false HTTP - connections are automatically redirected to HTTPS connections. - :vartype allow_insecure: bool - """ - - _validation = { - "fqdn": {"readonly": True}, - } - - _attribute_map = { - "fqdn": {"key": "fqdn", "type": "str"}, - "external": {"key": "external", "type": "bool"}, - "target_port": {"key": "targetPort", "type": "int"}, - "transport": {"key": "transport", "type": "str"}, - "traffic": {"key": "traffic", "type": "[TrafficWeight]"}, - "allow_insecure": {"key": "allowInsecure", "type": "bool"}, - } - - def __init__( - self, - *, - external: bool = False, - target_port: Optional[int] = None, - transport: Optional[Union[str, "_models.IngressTransportMethod"]] = None, - traffic: Optional[List["_models.TrafficWeight"]] = None, - allow_insecure: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword external: Bool indicating if app exposes an external http endpoint. - :paramtype external: bool - :keyword target_port: Target Port in containers for traffic from ingress. - :paramtype target_port: int - :keyword transport: Ingress transport protocol. Known values are: "auto", "http", and "http2". - :paramtype transport: str or ~azure.mgmt.web.v2024_04_01.models.IngressTransportMethod - :keyword traffic: - :paramtype traffic: list[~azure.mgmt.web.v2024_04_01.models.TrafficWeight] - :keyword allow_insecure: Bool indicating if HTTP connections to is allowed. If set to false - HTTP connections are automatically redirected to HTTPS connections. - :paramtype allow_insecure: bool - """ - super().__init__(**kwargs) - self.fqdn = None - self.external = external - self.target_port = target_port - self.transport = transport - self.traffic = traffic - self.allow_insecure = allow_insecure - - class IpAddress(_serialization.Model): """The ip address. @@ -17380,8 +17090,8 @@ class RampUpRule(_serialization.Model): :code:`ActionHostName`. :vartype reroute_percentage: float :ivar change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in @@ -17436,8 +17146,8 @@ def __init__( :code:`ActionHostName`. :paramtype reroute_percentage: float :keyword change_step: In auto ramp up scenario this is the step to add/remove from - :code:`ReroutePercentage` until it reaches - \\n:code:`MinReroutePercentage` or + :code:`ReroutePercentage` until it reaches \\n\\ + :code:`MinReroutePercentage` or :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified in :code:`ChangeIntervalInMinutes`.\\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in @@ -17967,45 +17677,6 @@ def __init__(self, *, key_type: Optional[Union[str, "_models.KeyType"]] = None, self.key_type = key_type -class RegistryCredentials(_serialization.Model): - """Container App Private Registry. - - :ivar server: Container Registry Server. - :vartype server: str - :ivar username: Container Registry Username. - :vartype username: str - :ivar password_secret_ref: The name of the Secret that contains the registry login password. - :vartype password_secret_ref: str - """ - - _attribute_map = { - "server": {"key": "server", "type": "str"}, - "username": {"key": "username", "type": "str"}, - "password_secret_ref": {"key": "passwordSecretRef", "type": "str"}, - } - - def __init__( - self, - *, - server: Optional[str] = None, - username: Optional[str] = None, - password_secret_ref: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword server: Container Registry Server. - :paramtype server: str - :keyword username: Container Registry Username. - :paramtype username: str - :keyword password_secret_ref: The name of the Secret that contains the registry login password. - :paramtype password_secret_ref: str - """ - super().__init__(**kwargs) - self.server = server - self.username = username - self.password_secret_ref = password_secret_ref - - class ReissueCertificateOrderRequest(ProxyOnlyResource): """Class representing certificate reissue request. @@ -19476,145 +19147,6 @@ def __init__( self.error = error -class Revision(Resource): - """Container App Revision. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource Name. - :vartype name: str - :ivar kind: Kind of resource. If the resource is an app, you can refer to - https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference # pylint: disable=line-too-long - for details supported values for kind. - :vartype kind: str - :ivar location: Resource Location. Required. - :vartype location: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar created_time: Timestamp describing when the revision was created - by controller. - :vartype created_time: ~datetime.datetime - :ivar fqdn: Fully qualified domain name of the revision. - :vartype fqdn: str - :ivar template: Container App Revision Template with all possible settings and the - defaults if user did not provide them. The defaults are populated - as they were at the creation time. - :vartype template: ~azure.mgmt.web.v2024_04_01.models.Template - :ivar active: Boolean describing if the Revision is Active. - :vartype active: bool - :ivar replicas: Number of pods currently running for this revision. - :vartype replicas: int - :ivar traffic_weight: Traffic weight assigned to this revision. - :vartype traffic_weight: int - :ivar provisioning_error: Optional Field - Platform Error Message. - :vartype provisioning_error: str - :ivar health_state: Current health State of the revision. Known values are: "Healthy", - "Unhealthy", and "None". - :vartype health_state: str or ~azure.mgmt.web.v2024_04_01.models.RevisionHealthState - :ivar provisioning_state: Current provisioning State of the revision. Known values are: - "Provisioning", "Provisioned", "Failed", "Deprovisioning", and "Deprovisioned". - :vartype provisioning_state: str or - ~azure.mgmt.web.v2024_04_01.models.RevisionProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "location": {"required": True}, - "type": {"readonly": True}, - "created_time": {"readonly": True}, - "fqdn": {"readonly": True}, - "template": {"readonly": True}, - "active": {"readonly": True}, - "replicas": {"readonly": True}, - "traffic_weight": {"readonly": True}, - "provisioning_error": {"readonly": True}, - "health_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "created_time": {"key": "properties.createdTime", "type": "iso-8601"}, - "fqdn": {"key": "properties.fqdn", "type": "str"}, - "template": {"key": "properties.template", "type": "Template"}, - "active": {"key": "properties.active", "type": "bool"}, - "replicas": {"key": "properties.replicas", "type": "int"}, - "traffic_weight": {"key": "properties.trafficWeight", "type": "int"}, - "provisioning_error": {"key": "properties.provisioningError", "type": "str"}, - "health_state": {"key": "properties.healthState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, *, location: str, kind: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs: Any - ) -> None: - """ - :keyword kind: Kind of resource. If the resource is an app, you can refer to - https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference # pylint: disable=line-too-long - for details supported values for kind. - :paramtype kind: str - :keyword location: Resource Location. Required. - :paramtype location: str - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(kind=kind, location=location, tags=tags, **kwargs) - self.created_time = None - self.fqdn = None - self.template = None - self.active = None - self.replicas = None - self.traffic_weight = None - self.provisioning_error = None - self.health_state = None - self.provisioning_state = None - - -class RevisionCollection(_serialization.Model): - """Container App Revisions collection ARM resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar value: Collection of resources. Required. - :vartype value: list[~azure.mgmt.web.v2024_04_01.models.Revision] - :ivar next_link: Link to next page of resources. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Revision]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: List["_models.Revision"], **kwargs: Any) -> None: - """ - :keyword value: Collection of resources. Required. - :paramtype value: list[~azure.mgmt.web.v2024_04_01.models.Revision] - """ - super().__init__(**kwargs) - self.value = value - self.next_link = None - - class RunCorrelation(_serialization.Model): """The correlation properties. @@ -19828,58 +19360,6 @@ def __init__( self.trigger_parameter = trigger_parameter -class Secret(_serialization.Model): - """Container App Secret. - - :ivar name: Secret Name. - :vartype name: str - :ivar value: Secret Value. - :vartype value: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: Secret Name. - :paramtype name: str - :keyword value: Secret Value. - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class SecretsCollection(_serialization.Model): - """Container App Secrets Collection ARM resource. - - All required parameters must be populated in order to send to server. - - :ivar value: Collection of resources. Required. - :vartype value: list[~azure.mgmt.web.v2024_04_01.models.ContainerAppSecret] - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ContainerAppSecret]"}, - } - - def __init__(self, *, value: List["_models.ContainerAppSecret"], **kwargs: Any) -> None: - """ - :keyword value: Collection of resources. Required. - :paramtype value: list[~azure.mgmt.web.v2024_04_01.models.ContainerAppSecret] - """ - super().__init__(**kwargs) - self.value = value - - class ServiceSpecification(_serialization.Model): """Resource metrics service provided by Microsoft.Insights resource provider. @@ -27474,46 +26954,6 @@ def __init__(self, *, value: List["_models.TopLevelDomain"], **kwargs: Any) -> N self.next_link = None -class TrafficWeight(_serialization.Model): - """Traffic weight assigned to a revision. - - :ivar revision_name: Name of a revision. - :vartype revision_name: str - :ivar weight: Traffic weight assigned to a revision. - :vartype weight: int - :ivar latest_revision: Indicates that the traffic weight belongs to a latest stable revision. - :vartype latest_revision: bool - """ - - _attribute_map = { - "revision_name": {"key": "revisionName", "type": "str"}, - "weight": {"key": "weight", "type": "int"}, - "latest_revision": {"key": "latestRevision", "type": "bool"}, - } - - def __init__( - self, - *, - revision_name: Optional[str] = None, - weight: Optional[int] = None, - latest_revision: bool = False, - **kwargs: Any - ) -> None: - """ - :keyword revision_name: Name of a revision. - :paramtype revision_name: str - :keyword weight: Traffic weight assigned to a revision. - :paramtype weight: int - :keyword latest_revision: Indicates that the traffic weight belongs to a latest stable - revision. - :paramtype latest_revision: bool - """ - super().__init__(**kwargs) - self.revision_name = revision_name - self.weight = weight - self.latest_revision = latest_revision - - class TriggeredJobHistory(ProxyOnlyResource): """Triggered Web Job History. List of Triggered Web Job Run Information elements. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_web_site_management_client_enums.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_web_site_management_client_enums.py index e96d56668376..e00940ad8eb3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_web_site_management_client_enums.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/models/_web_site_management_client_enums.py @@ -11,21 +11,6 @@ from azure.core import CaseInsensitiveEnumMeta -class ActiveRevisionsMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ActiveRevisionsMode controls how active revisions are handled for the Container app: - - - .. raw:: html - - Multiple: multiple revisions can be active. If no value if provided, this is the - defaultSingle: Only one revision can be active at a time. Revision weights can not - be used in this mode. - """ - - MULTIPLE = "multiple" - SINGLE = "single" - - class AppServicePlanRestrictions(str, Enum, metaclass=CaseInsensitiveEnumMeta): """App Service plans this offer is restricted to.""" @@ -272,15 +257,6 @@ class ConnectionStringType(str, Enum, metaclass=CaseInsensitiveEnumMeta): POSTGRE_SQL = "PostgreSQL" -class ContainerAppProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Provisioning state of the Container App.""" - - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELED = "Canceled" - - class ContinuousWebJobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Job status.""" @@ -534,14 +510,6 @@ class InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ALREADY_EXISTS = "AlreadyExists" -class IngressTransportMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Ingress transport protocol.""" - - AUTO = "auto" - HTTP = "http" - HTTP2 = "http2" - - class InsightStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Level of the most severe insight generated by the detector.""" @@ -862,24 +830,6 @@ class ResourceScopeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): WEB_SITE = "WebSite" -class RevisionHealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current health State of the revision.""" - - HEALTHY = "Healthy" - UNHEALTHY = "Unhealthy" - NONE = "None" - - -class RevisionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current provisioning State of the revision.""" - - PROVISIONING = "Provisioning" - PROVISIONED = "Provisioned" - FAILED = "Failed" - DEPROVISIONING = "Deprovisioning" - DEPROVISIONED = "Deprovisioned" - - class RouteType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of route this is: DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/__init__.py index df7c598a3db9..45ff9a2a4fd8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/__init__.py @@ -21,8 +21,6 @@ from ._app_service_environments_operations import AppServiceEnvironmentsOperations # type: ignore from ._app_service_plans_operations import AppServicePlansOperations # type: ignore from ._certificates_operations import CertificatesOperations # type: ignore -from ._container_apps_operations import ContainerAppsOperations # type: ignore -from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations # type: ignore from ._deleted_web_apps_operations import DeletedWebAppsOperations # type: ignore from ._diagnostics_operations import DiagnosticsOperations # type: ignore from ._global_operations_operations import GlobalOperations # type: ignore @@ -58,8 +56,6 @@ "AppServiceEnvironmentsOperations", "AppServicePlansOperations", "CertificatesOperations", - "ContainerAppsOperations", - "ContainerAppsRevisionsOperations", "DeletedWebAppsOperations", "DiagnosticsOperations", "GlobalOperations", diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_app_service_plans_operations.py index 98742360b1bc..2191bee2c6a2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_app_service_plans_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -1301,12 +1301,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -1334,7 +1331,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.App response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2603,12 +2600,9 @@ def get_vnet_from_server_farm( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2637,7 +2631,7 @@ def get_vnet_from_server_farm( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2952,12 +2946,9 @@ def get_route_for_vnet( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -2987,7 +2978,7 @@ def get_route_for_vnet( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3097,16 +3088,9 @@ def create_or_update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3148,7 +3132,7 @@ def create_or_update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3181,12 +3165,9 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3216,7 +3197,7 @@ def delete_vnet_route( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3322,16 +3303,9 @@ def update_vnet_route( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -3373,7 +3347,7 @@ def update_vnet_route( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_operations.py deleted file mode 100644 index b3a0308cfdee..000000000000 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_operations.py +++ /dev/null @@ -1,832 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from ..._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_subscription_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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps") - 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_list_by_resource_group_request(resource_group_name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "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_get_request(resource_group_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "name": _SERIALIZER.url("name", name, "str"), - "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_create_or_update_request( - resource_group_name: str, name: str, 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", "2024-04-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "name": _SERIALIZER.url("name", name, "str"), - "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 - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(resource_group_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "name": _SERIALIZER.url("name", name, "str"), - "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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request(name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets" - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "name": _SERIALIZER.url("name", name, "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="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ContainerAppsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.web.v2024_04_01.WebSiteManagementClient`'s - :attr:`container_apps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ContainerApp"]: - """Get the Container Apps in a given subscription. - - Get the Container Apps in a given subscription. - - :return: An iterator like instance of either ContainerApp or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :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 "2024-04-01")) - cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerAppCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.ContainerApp"]: - """Get the Container Apps in a given resource group. - - Get the Container Apps in a given resource group. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :return: An iterator like instance of either ContainerApp or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :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 "2024-04-01")) - cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerAppCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.ContainerApp: - """Get the properties of a Container App. - - Get the properties of a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :return: ContainerApp or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.ContainerApp - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), - } - 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 "2024-04-01")) - cls: ClsType[_models.ContainerApp] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ContainerApp", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - container_app_envelope: Union[_models.ContainerApp, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _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", self._api_version or "2024-04-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(container_app_envelope, (IOBase, bytes)): - _content = container_app_envelope - else: - _json = self._serialize.body(container_app_envelope, "ContainerApp") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: _models.ContainerApp, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Required. - :type container_app_envelope: ~azure.mgmt.web.v2024_04_01.models.ContainerApp - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Required. - :type container_app_envelope: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: Union[_models.ContainerApp, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ContainerApp]: - """Create or update a Container App. - - Description for Create or update a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :param container_app_envelope: Is either a ContainerApp type or a IO[bytes] type. Required. - :type container_app_envelope: ~azure.mgmt.web.v2024_04_01.models.ContainerApp or IO[bytes] - :return: An instance of LROPoller that returns either ContainerApp or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2024_04_01.models.ContainerApp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._api_version or "2024-04-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContainerApp] = 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._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - container_app_envelope=container_app_envelope, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ContainerApp", pipeline_response.http_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.ContainerApp].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ContainerApp]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]: - """Delete a Container App. - - Description for Delete a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param name: Name of the Container App. Required. - :type name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :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 "2024-04-01")) - cls: ClsType[None] = 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._delete_initial( - resource_group_name=resource_group_name, - name=name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - 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[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_secrets(self, name: str, **kwargs: Any) -> _models.SecretsCollection: - """List secrets for a container app. - - List secrets for a container app. - - :param name: Name of the Container App. Required. - :type name: str - :return: SecretsCollection or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.SecretsCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[_models.SecretsCollection] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SecretsCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_revisions_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_revisions_operations.py deleted file mode 100644 index c3d5d7d7bd78..000000000000 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_container_apps_revisions_operations.py +++ /dev/null @@ -1,574 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from ..._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_revisions_request( - resource_group_name: str, container_app_name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), - "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_get_revision_request( - resource_group_name: str, container_app_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "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_activate_revision_request( - resource_group_name: str, container_app_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "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="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_deactivate_revision_request( - resource_group_name: str, container_app_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "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="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_restart_revision_request( - resource_group_name: str, container_app_name: str, name: str, 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", "2024-04-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=90, - min_length=1, - pattern=r"^[-\w\._\(\)]+[^\.]$", - ), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "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="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ContainerAppsRevisionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.web.v2024_04_01.WebSiteManagementClient`'s - :attr:`container_apps_revisions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") - - @distributed_trace - def list_revisions( - self, resource_group_name: str, container_app_name: str, **kwargs: Any - ) -> Iterable["_models.Revision"]: - """Get the Revisions for a given Container App. - - Get the Revisions for a given Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App for which Revisions are needed. Required. - :type container_app_name: str - :return: An iterator like instance of either Revision or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2024_04_01.models.Revision] - :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 "2024-04-01")) - cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_revisions_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_revision( - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> _models.Revision: - """Get a revision of a Container App. - - Get a revision of a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision. Required. - :type name: str - :return: Revision or the result of cls(response) - :rtype: ~azure.mgmt.web.v2024_04_01.models.Revision - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[_models.Revision] = kwargs.pop("cls", None) - - _request = build_get_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Revision", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def activate_revision( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Activates a revision for a Container App. - - Activates a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to activate. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_activate_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def deactivate_revision( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Deactivates a revision for a Container App. - - Deactivates a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to deactivate. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_deactivate_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def restart_revision( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any - ) -> None: - """Restarts a revision for a Container App. - - Restarts a revision for a Container App. - - :param resource_group_name: Name of the resource group to which the resource belongs. Required. - :type resource_group_name: str - :param container_app_name: Name of the Container App. Required. - :type container_app_name: str - :param name: Name of the Container App Revision to restart. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 "2024-04-01")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_restart_revision_request( - resource_group_name=resource_group_name, - container_app_name=container_app_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_domains_operations.py index 594f0db00053..d5ed7066ccdd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_domains_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -2118,10 +2118,6 @@ def transfer_out(self, resource_group_name: str, domain_name: str, **kwargs: Any 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 400: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_web_apps_operations.py index c884c2b1107d..22a3d802f53d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2024_04_01/operations/_web_apps_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -17124,12 +17124,9 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17157,7 +17154,7 @@ def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _models.Sit response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17390,12 +17387,9 @@ def delete( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -17425,7 +17419,7 @@ def delete( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18064,12 +18058,9 @@ def delete_backup( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -18098,7 +18089,7 @@ def delete_backup( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22244,12 +22235,9 @@ def get_continuous_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22278,7 +22266,7 @@ def get_continuous_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22367,12 +22355,9 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22401,7 +22386,7 @@ def start_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22428,12 +22413,9 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -22462,7 +22444,7 @@ def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23780,11 +23762,8 @@ def _create_ms_deploy_operation_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -23829,7 +23808,7 @@ def _create_ms_deploy_operation_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23981,12 +23960,9 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24014,7 +23990,7 @@ def get_ms_deploy_log(self, resource_group_name: str, name: str, **kwargs: Any) response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24164,12 +24140,9 @@ def list_functions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24220,7 +24193,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24305,12 +24278,9 @@ def get_function( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24339,7 +24309,7 @@ def get_function( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24578,12 +24548,9 @@ def delete_function( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24612,7 +24579,7 @@ def delete_function( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24795,12 +24762,9 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -24830,7 +24794,7 @@ def delete_function_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25304,12 +25268,9 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25339,7 +25300,7 @@ def delete_host_secret( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25938,12 +25899,9 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -25973,7 +25931,7 @@ def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26481,12 +26439,9 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26515,7 +26470,7 @@ def delete_relay_service_connection( # pylint: disable=inconsistent-return-stat response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26891,11 +26846,8 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -26941,7 +26893,7 @@ def _create_instance_ms_deploy_operation_initial( # pylint: disable=name-too-lo response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27111,12 +27063,9 @@ def get_instance_ms_deploy_log( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27145,7 +27094,7 @@ def get_instance_ms_deploy_log( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27185,12 +27134,9 @@ def list_instance_processes( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27242,7 +27188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27274,12 +27220,9 @@ def get_instance_process( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27309,7 +27252,7 @@ def get_instance_process( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27345,12 +27288,9 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27380,7 +27320,7 @@ def delete_instance_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27411,12 +27351,9 @@ def get_instance_process_dump( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27451,7 +27388,7 @@ def get_instance_process_dump( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27493,12 +27430,9 @@ def list_instance_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27551,7 +27485,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27585,12 +27519,9 @@ def get_instance_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27621,7 +27552,7 @@ def get_instance_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27662,12 +27593,9 @@ def list_instance_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -27720,7 +27648,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28682,12 +28610,9 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28715,7 +28640,7 @@ def delete_swift_virtual_network( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28896,12 +28821,9 @@ def list_network_features( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -28930,7 +28852,7 @@ def list_network_features( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30883,12 +30805,9 @@ def list_processes(self, resource_group_name: str, name: str, **kwargs: Any) -> error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -30939,7 +30858,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -30966,12 +30885,9 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31000,7 +30916,7 @@ def get_process(self, resource_group_name: str, name: str, process_id: str, **kw response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31033,12 +30949,9 @@ def delete_process( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31067,7 +30980,7 @@ def delete_process( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31093,12 +31006,9 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31132,7 +31042,7 @@ def get_process_dump(self, resource_group_name: str, name: str, process_id: str, response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31171,12 +31081,9 @@ def list_process_modules( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31228,7 +31135,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31259,12 +31166,9 @@ def get_process_module( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31294,7 +31198,7 @@ def get_process_module( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -31332,12 +31236,9 @@ def list_process_threads( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -31389,7 +31290,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -32952,12 +32853,9 @@ def list_site_extensions( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33008,7 +32906,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33036,12 +32934,9 @@ def get_site_extension( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33070,7 +32965,7 @@ def get_site_extension( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33089,10 +32984,6 @@ def _install_site_extension_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33221,12 +33112,9 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33255,7 +33143,7 @@ def delete_site_extension( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33364,12 +33252,9 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33398,7 +33283,7 @@ def get_slot(self, resource_group_name: str, name: str, slot: str, **kwargs: Any response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -33658,12 +33543,9 @@ def delete_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -33694,7 +33576,7 @@ def delete_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -34393,12 +34275,9 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -34428,7 +34307,7 @@ def delete_backup_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38695,12 +38574,9 @@ def get_continuous_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38730,7 +38606,7 @@ def get_continuous_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38826,12 +38702,9 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38861,7 +38734,7 @@ def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -38891,12 +38764,9 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -38926,7 +38796,7 @@ def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40354,11 +40224,8 @@ def _create_ms_deploy_operation_slot_initial( error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40404,7 +40271,7 @@ def _create_ms_deploy_operation_slot_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40578,12 +40445,9 @@ def get_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40612,7 +40476,7 @@ def get_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40649,12 +40513,9 @@ def list_instance_functions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40706,7 +40567,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -40797,12 +40658,9 @@ def get_instance_function_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -40832,7 +40690,7 @@ def get_instance_function_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41085,12 +40943,9 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41120,7 +40975,7 @@ def delete_instance_function_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41315,12 +41170,9 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41351,7 +41203,7 @@ def delete_function_secret_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -41852,12 +41704,9 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -41888,7 +41737,7 @@ def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -42527,12 +42376,9 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -42563,7 +42409,7 @@ def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statem response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43110,12 +42956,9 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43145,7 +42988,7 @@ def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43547,11 +43390,8 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, + 409: ResourceExistsError, 304: ResourceNotModifiedError, - 409: cast( - Type[HttpResponseError], - lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43598,7 +43438,7 @@ def _create_instance_ms_deploy_operation_slot_initial( # pylint: disable=name-t response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43784,12 +43624,9 @@ def get_instance_ms_deploy_log_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43819,7 +43656,7 @@ def get_instance_ms_deploy_log_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43862,12 +43699,9 @@ def list_instance_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43920,7 +43754,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -43955,12 +43789,9 @@ def get_instance_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -43991,7 +43822,7 @@ def get_instance_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44030,12 +43861,9 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44066,7 +43894,7 @@ def delete_instance_process_slot( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44100,12 +43928,9 @@ def get_instance_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44141,7 +43966,7 @@ def get_instance_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44186,12 +44011,9 @@ def list_instance_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44245,7 +44067,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44289,12 +44111,9 @@ def get_instance_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44326,7 +44145,7 @@ def get_instance_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44370,12 +44189,9 @@ def list_instance_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -44429,7 +44245,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -44966,12 +44782,9 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -45000,7 +44813,7 @@ def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-st response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -45197,12 +45010,9 @@ def list_network_features_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -45232,7 +45042,7 @@ def list_network_features_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47315,12 +47125,9 @@ def list_processes_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47372,7 +47179,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47404,12 +47211,9 @@ def get_process_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47439,7 +47243,7 @@ def get_process_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47475,12 +47279,9 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47510,7 +47311,7 @@ def delete_process_slot( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47541,12 +47342,9 @@ def get_process_dump_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47581,7 +47379,7 @@ def get_process_dump_slot( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47623,12 +47421,9 @@ def list_process_modules_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47681,7 +47476,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47715,12 +47510,9 @@ def get_process_module_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47751,7 +47543,7 @@ def get_process_module_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -47792,12 +47584,9 @@ def list_process_threads_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -47850,7 +47639,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -49541,12 +49330,9 @@ def list_site_extensions_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49598,7 +49384,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -49629,12 +49415,9 @@ def get_site_extension_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49664,7 +49447,7 @@ def get_site_extension_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -49683,10 +49466,6 @@ def _install_site_extension_slot_initial( 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 429: cast( - Type[HttpResponseError], - lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49823,12 +49602,9 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -49858,7 +49634,7 @@ def delete_site_extension_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -50716,12 +50492,9 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -50751,7 +50524,7 @@ def delete_source_control_slot( # pylint: disable=inconsistent-return-statement 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51454,12 +51227,9 @@ def get_triggered_web_job_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51489,7 +51259,7 @@ def get_triggered_web_job_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51591,12 +51361,9 @@ def list_triggered_web_job_history_slot( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51649,7 +51416,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51683,12 +51450,9 @@ def get_triggered_web_job_history_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51719,7 +51483,7 @@ def get_triggered_web_job_history_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -51753,12 +51517,9 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -51788,7 +51549,7 @@ def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statement response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -52208,12 +51969,9 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -52243,7 +52001,7 @@ def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -52441,12 +52199,9 @@ def get_vnet_connection_gateway_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -52477,7 +52232,7 @@ def get_vnet_connection_gateway_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -53774,12 +53529,9 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -53808,7 +53560,7 @@ def delete_source_control( # pylint: disable=inconsistent-return-statements 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) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54467,12 +54219,9 @@ def get_triggered_web_job( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54501,7 +54250,7 @@ def get_triggered_web_job( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54596,12 +54345,9 @@ def list_triggered_web_job_history( error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54653,7 +54399,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54684,12 +54430,9 @@ def get_triggered_web_job_history( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54719,7 +54462,7 @@ def get_triggered_web_job_history( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -54750,12 +54493,9 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -54784,7 +54524,7 @@ def run_triggered_web_job( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55176,12 +54916,9 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55210,7 +54947,7 @@ def delete_vnet_connection( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -55392,12 +55129,9 @@ def get_vnet_connection_gateway( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -55427,7 +55161,7 @@ def get_vnet_connection_gateway( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -56285,12 +56019,9 @@ def get_instance_workflow_slot( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -56320,7 +56051,7 @@ def get_instance_workflow_slot( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -56498,12 +56229,9 @@ def get_workflow( """ error_map: MutableMapping = { 401: ClientAuthenticationError, + 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - 404: cast( - Type[HttpResponseError], - lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat), - ), } error_map.update(kwargs.pop("error_map", {}) or {}) @@ -56532,7 +56260,7 @@ def get_workflow( response = pipeline_response.http_response if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_multi_role_pool.py b/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_multi_role_pool.py index b4e2363eb264..5faefece4165 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_multi_role_pool.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_multi_role_pool.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,22 +21,21 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", ) - response = client.app_service_environments.begin_create_or_update_multi_role_pool( - resource_group_name="test-rg", - name="test-ase", - multi_role_pool_envelope={"properties": {"workerCount": 3, "workerSize": "Medium"}}, - ).result() + response = client.app_service_environments.update_multi_role_pool( + resource_group_name='test-rg', + name='test-ase', + multi_role_pool_envelope={'properties': {'workerCount': 3, 'workerSize': 'Medium'}}, + ) print(response) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json if __name__ == "__main__": main() += "__main__": + main() diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_worker_pool.py b/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_worker_pool.py index ee79577ad8a9..2f51bbdd1412 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_worker_pool.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/app_service_environments_create_or_update_worker_pool.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,8 +21,6 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), @@ -31,14 +28,15 @@ def main(): ) response = client.app_service_environments.update_worker_pool( - resource_group_name="test-rg", - name="test-ase", - worker_pool_name="0", - worker_pool_envelope={"properties": {"workerCount": 3, "workerSize": "Small"}}, + resource_group_name='test-rg', + name='test-ase', + worker_pool_name='0', + worker_pool_envelope={'properties': {'workerCount': 3, 'workerSize': 'Small'}}, ) print(response) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json if __name__ == "__main__": main() += "__main__": + main() diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py b/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py index 849f45099c01..0a019644a0ce 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,19 +21,20 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID", ) - response = client.provider.list_operations() + response = client.provider.list_operations( + ) for item in response: print(item) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListOperations.json if __name__ == "__main__": main() +__name__ == "__main__": + main() + main() diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/list_workflows_configuration_connections.py b/sdk/appservice/azure-mgmt-web/generated_samples/list_workflows_configuration_connections.py index bd9133a8d3a2..b598657c0c5b 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/list_workflows_configuration_connections.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/list_workflows_configuration_connections.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,8 +21,6 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), @@ -31,12 +28,13 @@ def main(): ) response = client.web_apps.list_workflows_connections( - resource_group_name="testrg123", - name="testsite2", + resource_group_name='testrg123', + name='testsite2', ) print(response) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWorkflowsConfigurationConnections.json if __name__ == "__main__": main() +__ == "__main__": + main() diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/start_web_site_network_trace_operation.py b/sdk/appservice/azure-mgmt-web/generated_samples/start_web_site_network_trace_operation.py index a3abe794f444..66e20802c38c 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/start_web_site_network_trace_operation.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/start_web_site_network_trace_operation.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,8 +21,6 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), @@ -31,12 +28,15 @@ def main(): ) response = client.web_apps.begin_start_network_trace( - resource_group_name="testrg123", - name="SampleApp", + resource_group_name='testrg123', + name='SampleApp', ).result() print(response) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StartWebSiteNetworkTraceOperation.json if __name__ == "__main__": main() +ame__ == "__main__": + main() +ain__": + main() diff --git a/sdk/appservice/azure-mgmt-web/generated_samples/stop_web_site_network_trace.py b/sdk/appservice/azure-mgmt-web/generated_samples/stop_web_site_network_trace.py index 96d736c55ae7..efc402091e8f 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/stop_web_site_network_trace.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/stop_web_site_network_trace.py @@ -9,7 +9,6 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient - """ # PREREQUISITES pip install azure-identity @@ -22,8 +21,6 @@ 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 = WebSiteManagementClient( credential=DefaultAzureCredential(), @@ -31,11 +28,13 @@ def main(): ) client.web_apps.stop_network_trace( - resource_group_name="testrg123", - name="SampleApp", + resource_group_name='testrg123', + name='SampleApp', ) - # x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StopWebSiteNetworkTrace.json if __name__ == "__main__": main() +ame__ == "__main__": + main() + main() diff --git a/sdk/appservice/azure-mgmt-web/setup.py b/sdk/appservice/azure-mgmt-web/setup.py index d39995f026b9..35a589a46dfe 100644 --- a/sdk/appservice/azure-mgmt-web/setup.py +++ b/sdk/appservice/azure-mgmt-web/setup.py @@ -22,11 +22,9 @@ # Version extraction inspired from 'requests' with open( - ( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py") - ), + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py"), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)