diff --git a/sdk/appservice/azure-mgmt-web/CHANGELOG.md b/sdk/appservice/azure-mgmt-web/CHANGELOG.md index 74aa8166ab9c..a0d94b6a65c6 100644 --- a/sdk/appservice/azure-mgmt-web/CHANGELOG.md +++ b/sdk/appservice/azure-mgmt-web/CHANGELOG.md @@ -1,8 +1,10 @@ # Release History -## 0.0.0 (2024-11-18) +## 8.0.0 (2025-01-23) -change log generation failed!!! +### Breaking Changes + + - Removed subfolders of some unused Api-Versions for smaller package size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change. ## 7.3.1 (2024-08-19) 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 41da083b833b..c2f92f94f4d8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- 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 7884fff20c78..6baf828723b0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py @@ -19,6 +19,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class WebSiteManagementClientConfiguration: """Configuration for WebSiteManagementClient. @@ -31,12 +32,7 @@ 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: @@ -44,23 +40,22 @@ def __init__( 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 f828816faac3..599f237da703 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,32 +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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -94,10 +78,7 @@ 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. @@ -106,32 +87,16 @@ def get_publishing_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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -144,11 +109,7 @@ def get_publishing_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. @@ -159,32 +120,16 @@ def get_source_control( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -197,10 +142,7 @@ def get_source_control( 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. @@ -209,35 +151,21 @@ def get_subscription_deployment_locations( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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 @@ -247,10 +175,7 @@ def get_subscription_deployment_locations( 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. @@ -259,12 +184,10 @@ def list_ase_regions( :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 == '2023-12-01': - from .v2023_12_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)) @@ -278,10 +201,7 @@ def list_ase_regions( 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. @@ -295,30 +215,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -332,9 +236,7 @@ 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. @@ -346,16 +248,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 == '2021-03-01': - from .v2021_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_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)) @@ -398,32 +296,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -434,12 +316,11 @@ 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. @@ -448,32 +329,16 @@ def list_premier_add_on_offers( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -487,9 +352,7 @@ def list_premier_add_on_offers( 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. @@ -502,35 +365,23 @@ 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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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 @@ -540,10 +391,7 @@ 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. @@ -552,32 +400,16 @@ def list_skus( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -590,10 +422,7 @@ def list_skus( 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. @@ -602,32 +431,16 @@ def list_source_controls( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -660,32 +473,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -698,11 +495,7 @@ 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. @@ -714,32 +507,16 @@ def update_publishing_user( :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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -753,10 +530,7 @@ def update_publishing_user( 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. @@ -771,32 +545,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -810,10 +568,7 @@ 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. @@ -828,32 +583,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -886,8 +625,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)) @@ -898,7 +637,9 @@ 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, @@ -920,32 +661,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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -959,9 +684,7 @@ 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. @@ -976,35 +699,21 @@ 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 == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_version.py index fb6c13e9c00f..b56384cd4633 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "0.0.0" +VERSION = "8.0.0" 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 8fddd571114d..a92777697e87 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,6 +26,7 @@ # 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." @@ -33,6 +34,7 @@ def __init__(self, *args, **kwargs): """ pass + class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """WebSite Management Client. @@ -57,28 +59,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", + "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: @@ -99,10 +103,7 @@ def __init__( 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 - ) + super(WebSiteManagementClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -112,78 +113,31 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2015-04-01: :mod:`v2015_04_01.models` - * 2015-08-01: :mod:`v2015_08_01.models` - * 2016-03-01: :mod:`v2016_03_01.models` - * 2016-08-01: :mod:`v2016_08_01.models` - * 2016-09-01: :mod:`v2016_09_01.models` - * 2018-02-01: :mod:`v2018_02_01.models` - * 2018-11-01: :mod:`v2018_11_01.models` - * 2019-08-01: :mod:`v2019_08_01.models` - * 2020-06-01: :mod:`v2020_06_01.models` - * 2020-09-01: :mod:`v2020_09_01.models` - * 2020-12-01: :mod:`v2020_12_01.models` - * 2021-01-01: :mod:`v2021_01_01.models` - * 2021-01-15: :mod:`v2021_01_15.models` - * 2021-03-01: :mod:`v2021_03_01.models` - * 2022-09-01: :mod:`v2022_09_01.models` - * 2023-01-01: :mod:`v2023_01_01.models` - * 2023-12-01: :mod:`v2023_12_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 == '2015-04-01': - from .v2015_04_01 import models - return models - elif api_version == '2015-08-01': - from .v2015_08_01 import models - return models - elif api_version == '2016-03-01': + if api_version == "2016-03-01": from .v2016_03_01 import models + return models - elif api_version == '2016-08-01': - from .v2016_08_01 import models - return models - elif api_version == '2016-09-01': - from .v2016_09_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 == '2018-11-01': - from .v2018_11_01 import models - return models - elif api_version == '2019-08-01': - from .v2019_08_01 import models - return models - elif api_version == '2020-06-01': - from .v2020_06_01 import models - return models - elif api_version == '2020-09-01': - from .v2020_09_01 import models - return models - elif api_version == '2020-12-01': - from .v2020_12_01 import models - return models - elif api_version == '2021-01-01': - from .v2021_01_01 import models - return models - elif api_version == '2021-01-15': - from .v2021_01_15 import models - return models - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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)) @@ -191,1148 +145,893 @@ def models(cls, api_version=DEFAULT_API_VERSION): def app_service_certificate_orders(self): """Instance depends on the API version: - * 2015-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` - * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` - * 2021-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2021-01-15: :class:`AppServiceCertificateOrdersOperations` - * 2021-03-01: :class:`AppServiceCertificateOrdersOperations` - * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-12-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 == '2015-08-01': - from .v2015_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2016-09-01: :class:`AppServiceEnvironmentsOperations` - * 2018-02-01: :class:`AppServiceEnvironmentsOperations` - * 2019-08-01: :class:`AppServiceEnvironmentsOperations` - * 2020-06-01: :class:`AppServiceEnvironmentsOperations` - * 2020-09-01: :class:`AppServiceEnvironmentsOperations` - * 2020-12-01: :class:`AppServiceEnvironmentsOperations` - * 2021-01-01: :class:`AppServiceEnvironmentsOperations` - * 2021-01-15: :class:`AppServiceEnvironmentsOperations` - * 2021-03-01: :class:`AppServiceEnvironmentsOperations` - * 2022-09-01: :class:`AppServiceEnvironmentsOperations` - * 2023-01-01: :class:`AppServiceEnvironmentsOperations` - * 2023-12-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 == '2016-09-01': - from .v2016_09_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2016-09-01: :class:`AppServicePlansOperations` - * 2018-02-01: :class:`AppServicePlansOperations` - * 2019-08-01: :class:`AppServicePlansOperations` - * 2020-06-01: :class:`AppServicePlansOperations` - * 2020-09-01: :class:`AppServicePlansOperations` - * 2020-12-01: :class:`AppServicePlansOperations` - * 2021-01-01: :class:`AppServicePlansOperations` - * 2021-01-15: :class:`AppServicePlansOperations` - * 2021-03-01: :class:`AppServicePlansOperations` - * 2022-09-01: :class:`AppServicePlansOperations` - * 2023-01-01: :class:`AppServicePlansOperations` - * 2023-12-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 == '2016-09-01': - from .v2016_09_01.operations import AppServicePlansOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2020-12-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-01-15: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-03-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-12-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 == '2020-12-01': - from .v2020_12_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_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: - * 2015-08-01: :class:`CertificateRegistrationProviderOperations` - * 2018-02-01: :class:`CertificateRegistrationProviderOperations` - * 2019-08-01: :class:`CertificateRegistrationProviderOperations` - * 2020-06-01: :class:`CertificateRegistrationProviderOperations` - * 2020-09-01: :class:`CertificateRegistrationProviderOperations` - * 2020-12-01: :class:`CertificateRegistrationProviderOperations` - * 2021-01-01: :class:`CertificateRegistrationProviderOperations` - * 2021-01-15: :class:`CertificateRegistrationProviderOperations` - * 2021-03-01: :class:`CertificateRegistrationProviderOperations` - * 2022-09-01: :class:`CertificateRegistrationProviderOperations` - * 2023-01-01: :class:`CertificateRegistrationProviderOperations` - * 2023-12-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 == '2015-08-01': - from .v2015_08_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2018-11-01: :class:`CertificatesOperations` - * 2019-08-01: :class:`CertificatesOperations` - * 2020-06-01: :class:`CertificatesOperations` - * 2020-09-01: :class:`CertificatesOperations` - * 2020-12-01: :class:`CertificatesOperations` - * 2021-01-01: :class:`CertificatesOperations` - * 2021-01-15: :class:`CertificatesOperations` - * 2021-03-01: :class:`CertificatesOperations` - * 2022-09-01: :class:`CertificatesOperations` - * 2023-01-01: :class:`CertificatesOperations` - * 2023-12-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 == '2018-11-01': - from .v2018_11_01.operations import CertificatesOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import CertificatesOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import CertificatesOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import CertificatesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2021-03-01: :class:`ContainerAppsOperations` - * 2022-09-01: :class:`ContainerAppsOperations` - * 2023-01-01: :class:`ContainerAppsOperations` - * 2023-12-01: :class:`ContainerAppsOperations` - * 2024-04-01: :class:`ContainerAppsOperations` + * 2022-09-01: :class:`ContainerAppsOperations` + * 2023-01-01: :class:`ContainerAppsOperations` + * 2024-04-01: :class:`ContainerAppsOperations` """ - api_version = self._get_api_version('container_apps') - if api_version == '2021-03-01': - from .v2021_03_01.operations import ContainerAppsOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_01.operations import ContainerAppsOperations as OperationClass - elif api_version == '2024-04-01': + 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: - * 2021-03-01: :class:`ContainerAppsRevisionsOperations` - * 2022-09-01: :class:`ContainerAppsRevisionsOperations` - * 2023-01-01: :class:`ContainerAppsRevisionsOperations` - * 2023-12-01: :class:`ContainerAppsRevisionsOperations` - * 2024-04-01: :class:`ContainerAppsRevisionsOperations` + * 2022-09-01: :class:`ContainerAppsRevisionsOperations` + * 2023-01-01: :class:`ContainerAppsRevisionsOperations` + * 2024-04-01: :class:`ContainerAppsRevisionsOperations` """ - api_version = self._get_api_version('container_apps_revisions') - if api_version == '2021-03-01': - from .v2021_03_01.operations import ContainerAppsRevisionsOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_01.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == '2024-04-01': + 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` - * 2019-08-01: :class:`DeletedWebAppsOperations` - * 2020-06-01: :class:`DeletedWebAppsOperations` - * 2020-09-01: :class:`DeletedWebAppsOperations` - * 2020-12-01: :class:`DeletedWebAppsOperations` - * 2021-01-01: :class:`DeletedWebAppsOperations` - * 2021-01-15: :class:`DeletedWebAppsOperations` - * 2021-03-01: :class:`DeletedWebAppsOperations` - * 2022-09-01: :class:`DeletedWebAppsOperations` - * 2023-01-01: :class:`DeletedWebAppsOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2019-08-01: :class:`DiagnosticsOperations` - * 2020-06-01: :class:`DiagnosticsOperations` - * 2020-09-01: :class:`DiagnosticsOperations` - * 2020-12-01: :class:`DiagnosticsOperations` - * 2021-01-01: :class:`DiagnosticsOperations` - * 2021-01-15: :class:`DiagnosticsOperations` - * 2021-03-01: :class:`DiagnosticsOperations` - * 2022-09-01: :class:`DiagnosticsOperations` - * 2023-01-01: :class:`DiagnosticsOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2015-04-01: :class:`DomainRegistrationProviderOperations` - * 2018-02-01: :class:`DomainRegistrationProviderOperations` - * 2019-08-01: :class:`DomainRegistrationProviderOperations` - * 2020-06-01: :class:`DomainRegistrationProviderOperations` - * 2020-09-01: :class:`DomainRegistrationProviderOperations` - * 2020-12-01: :class:`DomainRegistrationProviderOperations` - * 2021-01-01: :class:`DomainRegistrationProviderOperations` - * 2021-01-15: :class:`DomainRegistrationProviderOperations` - * 2021-03-01: :class:`DomainRegistrationProviderOperations` - * 2022-09-01: :class:`DomainRegistrationProviderOperations` - * 2023-01-01: :class:`DomainRegistrationProviderOperations` - * 2023-12-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 == '2015-04-01': - from .v2015_04_01.operations import DomainRegistrationProviderOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2015-04-01: :class:`DomainsOperations` - * 2018-02-01: :class:`DomainsOperations` - * 2019-08-01: :class:`DomainsOperations` - * 2020-06-01: :class:`DomainsOperations` - * 2020-09-01: :class:`DomainsOperations` - * 2020-12-01: :class:`DomainsOperations` - * 2021-01-01: :class:`DomainsOperations` - * 2021-01-15: :class:`DomainsOperations` - * 2021-03-01: :class:`DomainsOperations` - * 2022-09-01: :class:`DomainsOperations` - * 2023-01-01: :class:`DomainsOperations` - * 2023-12-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 == '2015-04-01': - from .v2015_04_01.operations import DomainsOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DomainsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import DomainsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import DomainsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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: - * 2020-12-01: :class:`GlobalOperations` - * 2021-01-01: :class:`GlobalOperations` - * 2021-01-15: :class:`GlobalOperations` - * 2021-03-01: :class:`GlobalOperations` - * 2022-09-01: :class:`GlobalOperations` - * 2023-01-01: :class:`GlobalOperations` - * 2023-12-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 == '2020-12-01': - from .v2020_12_01.operations import GlobalOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import GlobalOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import GlobalOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import GlobalOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_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: - * 2021-01-01: :class:`KubeEnvironmentsOperations` - * 2021-01-15: :class:`KubeEnvironmentsOperations` - * 2021-03-01: :class:`KubeEnvironmentsOperations` - * 2022-09-01: :class:`KubeEnvironmentsOperations` - * 2023-01-01: :class:`KubeEnvironmentsOperations` - * 2023-12-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 == '2021-01-01': - from .v2021_01_01.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import KubeEnvironmentsOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_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` - * 2019-08-01: :class:`ProviderOperations` - * 2020-06-01: :class:`ProviderOperations` - * 2020-09-01: :class:`ProviderOperations` - * 2020-12-01: :class:`ProviderOperations` - * 2021-01-01: :class:`ProviderOperations` - * 2021-01-15: :class:`ProviderOperations` - * 2021-03-01: :class:`ProviderOperations` - * 2022-09-01: :class:`ProviderOperations` - * 2023-01-01: :class:`ProviderOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import ProviderOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import ProviderOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import ProviderOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2019-08-01: :class:`RecommendationsOperations` - * 2020-06-01: :class:`RecommendationsOperations` - * 2020-09-01: :class:`RecommendationsOperations` - * 2020-12-01: :class:`RecommendationsOperations` - * 2021-01-01: :class:`RecommendationsOperations` - * 2021-01-15: :class:`RecommendationsOperations` - * 2021-03-01: :class:`RecommendationsOperations` - * 2022-09-01: :class:`RecommendationsOperations` - * 2023-01-01: :class:`RecommendationsOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2019-08-01: :class:`ResourceHealthMetadataOperations` - * 2020-06-01: :class:`ResourceHealthMetadataOperations` - * 2020-09-01: :class:`ResourceHealthMetadataOperations` - * 2020-12-01: :class:`ResourceHealthMetadataOperations` - * 2021-01-01: :class:`ResourceHealthMetadataOperations` - * 2021-01-15: :class:`ResourceHealthMetadataOperations` - * 2021-03-01: :class:`ResourceHealthMetadataOperations` - * 2022-09-01: :class:`ResourceHealthMetadataOperations` - * 2023-01-01: :class:`ResourceHealthMetadataOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2019-08-01: :class:`StaticSitesOperations` - * 2020-06-01: :class:`StaticSitesOperations` - * 2020-09-01: :class:`StaticSitesOperations` - * 2020-12-01: :class:`StaticSitesOperations` - * 2021-01-01: :class:`StaticSitesOperations` - * 2021-01-15: :class:`StaticSitesOperations` - * 2021-03-01: :class:`StaticSitesOperations` - * 2022-09-01: :class:`StaticSitesOperations` - * 2023-01-01: :class:`StaticSitesOperations` - * 2023-12-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 == '2019-08-01': - from .v2019_08_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import StaticSitesOperations as OperationClass - elif 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 == '2023-12-01': - from .v2023_12_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: - * 2015-04-01: :class:`TopLevelDomainsOperations` - * 2018-02-01: :class:`TopLevelDomainsOperations` - * 2019-08-01: :class:`TopLevelDomainsOperations` - * 2020-06-01: :class:`TopLevelDomainsOperations` - * 2020-09-01: :class:`TopLevelDomainsOperations` - * 2020-12-01: :class:`TopLevelDomainsOperations` - * 2021-01-01: :class:`TopLevelDomainsOperations` - * 2021-01-15: :class:`TopLevelDomainsOperations` - * 2021-03-01: :class:`TopLevelDomainsOperations` - * 2022-09-01: :class:`TopLevelDomainsOperations` - * 2023-01-01: :class:`TopLevelDomainsOperations` - * 2023-12-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 == '2015-04-01': - from .v2015_04_01.operations import TopLevelDomainsOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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: - * 2016-08-01: :class:`WebAppsOperations` - * 2018-02-01: :class:`WebAppsOperations` - * 2019-08-01: :class:`WebAppsOperations` - * 2020-06-01: :class:`WebAppsOperations` - * 2020-09-01: :class:`WebAppsOperations` - * 2020-12-01: :class:`WebAppsOperations` - * 2021-01-01: :class:`WebAppsOperations` - * 2021-01-15: :class:`WebAppsOperations` - * 2021-03-01: :class:`WebAppsOperations` - * 2022-09-01: :class:`WebAppsOperations` - * 2023-01-01: :class:`WebAppsOperations` - * 2023-12-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 == '2016-08-01': - from .v2016_08_01.operations import WebAppsOperations as OperationClass - elif 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 == '2019-08-01': - from .v2019_08_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebAppsOperations as OperationClass - elif api_version == '2021-01-01': - from .v2021_01_01.operations import WebAppsOperations as OperationClass - elif api_version == '2021-01-15': - from .v2021_01_15.operations import WebAppsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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` - * 2023-12-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 == '2023-12-01': - from .v2023_12_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 fc106a4f3d78..69d2fd6fad25 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,4 +7,5 @@ # -------------------------------------------------------------------------- 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 1607b11f8966..40e8a9ad2994 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,6 +19,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class WebSiteManagementClientConfiguration: """Configuration for WebSiteManagementClient. @@ -31,12 +32,7 @@ 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: @@ -44,23 +40,22 @@ def __init__( 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 b6aea57949f1..9654539b57b5 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,32 +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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -94,10 +78,7 @@ 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. @@ -106,32 +87,16 @@ async def get_publishing_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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -144,11 +109,7 @@ async def get_publishing_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. @@ -159,32 +120,16 @@ async def get_source_control( :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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -197,10 +142,7 @@ async def get_source_control( 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. @@ -209,35 +151,21 @@ async def get_subscription_deployment_locations( :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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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 @@ -247,10 +175,7 @@ async def get_subscription_deployment_locations( 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. @@ -259,12 +184,10 @@ def list_ase_regions( :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 == '2023-12-01': - from ..v2023_12_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)) @@ -278,10 +201,7 @@ def list_ase_regions( 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. @@ -296,30 +216,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -333,9 +237,7 @@ 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. @@ -348,16 +250,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 == '2021-03-01': - from ..v2021_03_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_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)) @@ -400,32 +298,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -436,12 +318,11 @@ 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. @@ -451,32 +332,16 @@ def list_premier_add_on_offers( ~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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -490,9 +355,7 @@ def list_premier_add_on_offers( 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. @@ -505,35 +368,23 @@ 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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 @@ -543,10 +394,7 @@ 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. @@ -555,32 +403,16 @@ async def list_skus( :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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -593,10 +425,7 @@ async def list_skus( 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. @@ -606,32 +435,16 @@ def list_source_controls( ~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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -664,32 +477,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -702,11 +499,7 @@ 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. @@ -718,32 +511,16 @@ async def update_publishing_user( :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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -757,10 +534,7 @@ async def update_publishing_user( 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. @@ -775,32 +549,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -814,10 +572,7 @@ 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. @@ -832,32 +587,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -890,8 +629,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)) @@ -902,7 +641,9 @@ 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, @@ -924,32 +665,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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -963,9 +688,7 @@ 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. @@ -980,35 +703,21 @@ 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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 302cd90e5175..3c9ce7907d27 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,6 +26,7 @@ # 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." @@ -33,6 +34,7 @@ def __init__(self, *args, **kwargs): """ pass + class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """WebSite Management Client. @@ -57,15 +59,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", + "validate_container_settings": "2018-02-01", + } + }, + _PROFILE_TAG + " latest", ) def __init__( @@ -78,7 +82,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: @@ -99,10 +103,7 @@ def __init__( 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 - ) + super(WebSiteManagementClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -112,78 +113,31 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2015-04-01: :mod:`v2015_04_01.models` - * 2015-08-01: :mod:`v2015_08_01.models` - * 2016-03-01: :mod:`v2016_03_01.models` - * 2016-08-01: :mod:`v2016_08_01.models` - * 2016-09-01: :mod:`v2016_09_01.models` - * 2018-02-01: :mod:`v2018_02_01.models` - * 2018-11-01: :mod:`v2018_11_01.models` - * 2019-08-01: :mod:`v2019_08_01.models` - * 2020-06-01: :mod:`v2020_06_01.models` - * 2020-09-01: :mod:`v2020_09_01.models` - * 2020-12-01: :mod:`v2020_12_01.models` - * 2021-01-01: :mod:`v2021_01_01.models` - * 2021-01-15: :mod:`v2021_01_15.models` - * 2021-03-01: :mod:`v2021_03_01.models` - * 2022-09-01: :mod:`v2022_09_01.models` - * 2023-01-01: :mod:`v2023_01_01.models` - * 2023-12-01: :mod:`v2023_12_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 == '2015-04-01': - from ..v2015_04_01 import models - return models - elif api_version == '2015-08-01': - from ..v2015_08_01 import models - return models - elif api_version == '2016-03-01': + if api_version == "2016-03-01": from ..v2016_03_01 import models + return models - elif api_version == '2016-08-01': - from ..v2016_08_01 import models - return models - elif api_version == '2016-09-01': - from ..v2016_09_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 == '2018-11-01': - from ..v2018_11_01 import models - return models - elif api_version == '2019-08-01': - from ..v2019_08_01 import models - return models - elif api_version == '2020-06-01': - from ..v2020_06_01 import models - return models - elif api_version == '2020-09-01': - from ..v2020_09_01 import models - return models - elif api_version == '2020-12-01': - from ..v2020_12_01 import models - return models - elif api_version == '2021-01-01': - from ..v2021_01_01 import models - return models - elif api_version == '2021-01-15': - from ..v2021_01_15 import models - return models - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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)) @@ -191,1148 +145,899 @@ def models(cls, api_version=DEFAULT_API_VERSION): def app_service_certificate_orders(self): """Instance depends on the API version: - * 2015-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` - * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` - * 2021-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2021-01-15: :class:`AppServiceCertificateOrdersOperations` - * 2021-03-01: :class:`AppServiceCertificateOrdersOperations` - * 2022-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-01-01: :class:`AppServiceCertificateOrdersOperations` - * 2023-12-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 == '2015-08-01': - from ..v2015_08_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2016-09-01: :class:`AppServiceEnvironmentsOperations` - * 2018-02-01: :class:`AppServiceEnvironmentsOperations` - * 2019-08-01: :class:`AppServiceEnvironmentsOperations` - * 2020-06-01: :class:`AppServiceEnvironmentsOperations` - * 2020-09-01: :class:`AppServiceEnvironmentsOperations` - * 2020-12-01: :class:`AppServiceEnvironmentsOperations` - * 2021-01-01: :class:`AppServiceEnvironmentsOperations` - * 2021-01-15: :class:`AppServiceEnvironmentsOperations` - * 2021-03-01: :class:`AppServiceEnvironmentsOperations` - * 2022-09-01: :class:`AppServiceEnvironmentsOperations` - * 2023-01-01: :class:`AppServiceEnvironmentsOperations` - * 2023-12-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 == '2016-09-01': - from ..v2016_09_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2016-09-01: :class:`AppServicePlansOperations` - * 2018-02-01: :class:`AppServicePlansOperations` - * 2019-08-01: :class:`AppServicePlansOperations` - * 2020-06-01: :class:`AppServicePlansOperations` - * 2020-09-01: :class:`AppServicePlansOperations` - * 2020-12-01: :class:`AppServicePlansOperations` - * 2021-01-01: :class:`AppServicePlansOperations` - * 2021-01-15: :class:`AppServicePlansOperations` - * 2021-03-01: :class:`AppServicePlansOperations` - * 2022-09-01: :class:`AppServicePlansOperations` - * 2023-01-01: :class:`AppServicePlansOperations` - * 2023-12-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 == '2016-09-01': - from ..v2016_09_01.aio.operations import AppServicePlansOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import AppServicePlansOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2020-12-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-01-15: :class:`CertificateOrdersDiagnosticsOperations` - * 2021-03-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2022-09-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-01-01: :class:`CertificateOrdersDiagnosticsOperations` - * 2023-12-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 == '2020-12-01': - from ..v2020_12_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import CertificateOrdersDiagnosticsOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_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: - * 2015-08-01: :class:`CertificateRegistrationProviderOperations` - * 2018-02-01: :class:`CertificateRegistrationProviderOperations` - * 2019-08-01: :class:`CertificateRegistrationProviderOperations` - * 2020-06-01: :class:`CertificateRegistrationProviderOperations` - * 2020-09-01: :class:`CertificateRegistrationProviderOperations` - * 2020-12-01: :class:`CertificateRegistrationProviderOperations` - * 2021-01-01: :class:`CertificateRegistrationProviderOperations` - * 2021-01-15: :class:`CertificateRegistrationProviderOperations` - * 2021-03-01: :class:`CertificateRegistrationProviderOperations` - * 2022-09-01: :class:`CertificateRegistrationProviderOperations` - * 2023-01-01: :class:`CertificateRegistrationProviderOperations` - * 2023-12-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 == '2015-08-01': - from ..v2015_08_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2018-11-01: :class:`CertificatesOperations` - * 2019-08-01: :class:`CertificatesOperations` - * 2020-06-01: :class:`CertificatesOperations` - * 2020-09-01: :class:`CertificatesOperations` - * 2020-12-01: :class:`CertificatesOperations` - * 2021-01-01: :class:`CertificatesOperations` - * 2021-01-15: :class:`CertificatesOperations` - * 2021-03-01: :class:`CertificatesOperations` - * 2022-09-01: :class:`CertificatesOperations` - * 2023-01-01: :class:`CertificatesOperations` - * 2023-12-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 == '2018-11-01': - from ..v2018_11_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2019-08-01': - from ..v2019_08_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2021-03-01: :class:`ContainerAppsOperations` - * 2022-09-01: :class:`ContainerAppsOperations` - * 2023-01-01: :class:`ContainerAppsOperations` - * 2023-12-01: :class:`ContainerAppsOperations` - * 2024-04-01: :class:`ContainerAppsOperations` + * 2022-09-01: :class:`ContainerAppsOperations` + * 2023-01-01: :class:`ContainerAppsOperations` + * 2024-04-01: :class:`ContainerAppsOperations` """ - api_version = self._get_api_version('container_apps') - if api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ContainerAppsOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_01.aio.operations import ContainerAppsOperations as OperationClass - elif api_version == '2024-04-01': + 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: - * 2021-03-01: :class:`ContainerAppsRevisionsOperations` - * 2022-09-01: :class:`ContainerAppsRevisionsOperations` - * 2023-01-01: :class:`ContainerAppsRevisionsOperations` - * 2023-12-01: :class:`ContainerAppsRevisionsOperations` - * 2024-04-01: :class:`ContainerAppsRevisionsOperations` + * 2022-09-01: :class:`ContainerAppsRevisionsOperations` + * 2023-01-01: :class:`ContainerAppsRevisionsOperations` + * 2024-04-01: :class:`ContainerAppsRevisionsOperations` """ - api_version = self._get_api_version('container_apps_revisions') - if api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ContainerAppsRevisionsOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_01.aio.operations import ContainerAppsRevisionsOperations as OperationClass - elif api_version == '2024-04-01': + 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` - * 2019-08-01: :class:`DeletedWebAppsOperations` - * 2020-06-01: :class:`DeletedWebAppsOperations` - * 2020-09-01: :class:`DeletedWebAppsOperations` - * 2020-12-01: :class:`DeletedWebAppsOperations` - * 2021-01-01: :class:`DeletedWebAppsOperations` - * 2021-01-15: :class:`DeletedWebAppsOperations` - * 2021-03-01: :class:`DeletedWebAppsOperations` - * 2022-09-01: :class:`DeletedWebAppsOperations` - * 2023-01-01: :class:`DeletedWebAppsOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2019-08-01: :class:`DiagnosticsOperations` - * 2020-06-01: :class:`DiagnosticsOperations` - * 2020-09-01: :class:`DiagnosticsOperations` - * 2020-12-01: :class:`DiagnosticsOperations` - * 2021-01-01: :class:`DiagnosticsOperations` - * 2021-01-15: :class:`DiagnosticsOperations` - * 2021-03-01: :class:`DiagnosticsOperations` - * 2022-09-01: :class:`DiagnosticsOperations` - * 2023-01-01: :class:`DiagnosticsOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import DiagnosticsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2015-04-01: :class:`DomainRegistrationProviderOperations` - * 2018-02-01: :class:`DomainRegistrationProviderOperations` - * 2019-08-01: :class:`DomainRegistrationProviderOperations` - * 2020-06-01: :class:`DomainRegistrationProviderOperations` - * 2020-09-01: :class:`DomainRegistrationProviderOperations` - * 2020-12-01: :class:`DomainRegistrationProviderOperations` - * 2021-01-01: :class:`DomainRegistrationProviderOperations` - * 2021-01-15: :class:`DomainRegistrationProviderOperations` - * 2021-03-01: :class:`DomainRegistrationProviderOperations` - * 2022-09-01: :class:`DomainRegistrationProviderOperations` - * 2023-01-01: :class:`DomainRegistrationProviderOperations` - * 2023-12-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 == '2015-04-01': - from ..v2015_04_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2015-04-01: :class:`DomainsOperations` - * 2018-02-01: :class:`DomainsOperations` - * 2019-08-01: :class:`DomainsOperations` - * 2020-06-01: :class:`DomainsOperations` - * 2020-09-01: :class:`DomainsOperations` - * 2020-12-01: :class:`DomainsOperations` - * 2021-01-01: :class:`DomainsOperations` - * 2021-01-15: :class:`DomainsOperations` - * 2021-03-01: :class:`DomainsOperations` - * 2022-09-01: :class:`DomainsOperations` - * 2023-01-01: :class:`DomainsOperations` - * 2023-12-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 == '2015-04-01': - from ..v2015_04_01.aio.operations import DomainsOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import DomainsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import DomainsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import DomainsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import DomainsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import DomainsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import DomainsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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: - * 2020-12-01: :class:`GlobalOperations` - * 2021-01-01: :class:`GlobalOperations` - * 2021-01-15: :class:`GlobalOperations` - * 2021-03-01: :class:`GlobalOperations` - * 2022-09-01: :class:`GlobalOperations` - * 2023-01-01: :class:`GlobalOperations` - * 2023-12-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 == '2020-12-01': - from ..v2020_12_01.aio.operations import GlobalOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import GlobalOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import GlobalOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import GlobalOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_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: - * 2021-01-01: :class:`KubeEnvironmentsOperations` - * 2021-01-15: :class:`KubeEnvironmentsOperations` - * 2021-03-01: :class:`KubeEnvironmentsOperations` - * 2022-09-01: :class:`KubeEnvironmentsOperations` - * 2023-01-01: :class:`KubeEnvironmentsOperations` - * 2023-12-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 == '2021-01-01': - from ..v2021_01_01.aio.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import KubeEnvironmentsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import KubeEnvironmentsOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_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` - * 2019-08-01: :class:`ProviderOperations` - * 2020-06-01: :class:`ProviderOperations` - * 2020-09-01: :class:`ProviderOperations` - * 2020-12-01: :class:`ProviderOperations` - * 2021-01-01: :class:`ProviderOperations` - * 2021-01-15: :class:`ProviderOperations` - * 2021-03-01: :class:`ProviderOperations` - * 2022-09-01: :class:`ProviderOperations` - * 2023-01-01: :class:`ProviderOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import ProviderOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import ProviderOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import ProviderOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import ProviderOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import ProviderOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import ProviderOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2019-08-01: :class:`RecommendationsOperations` - * 2020-06-01: :class:`RecommendationsOperations` - * 2020-09-01: :class:`RecommendationsOperations` - * 2020-12-01: :class:`RecommendationsOperations` - * 2021-01-01: :class:`RecommendationsOperations` - * 2021-01-15: :class:`RecommendationsOperations` - * 2021-03-01: :class:`RecommendationsOperations` - * 2022-09-01: :class:`RecommendationsOperations` - * 2023-01-01: :class:`RecommendationsOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import RecommendationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2019-08-01: :class:`ResourceHealthMetadataOperations` - * 2020-06-01: :class:`ResourceHealthMetadataOperations` - * 2020-09-01: :class:`ResourceHealthMetadataOperations` - * 2020-12-01: :class:`ResourceHealthMetadataOperations` - * 2021-01-01: :class:`ResourceHealthMetadataOperations` - * 2021-01-15: :class:`ResourceHealthMetadataOperations` - * 2021-03-01: :class:`ResourceHealthMetadataOperations` - * 2022-09-01: :class:`ResourceHealthMetadataOperations` - * 2023-01-01: :class:`ResourceHealthMetadataOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2019-08-01: :class:`StaticSitesOperations` - * 2020-06-01: :class:`StaticSitesOperations` - * 2020-09-01: :class:`StaticSitesOperations` - * 2020-12-01: :class:`StaticSitesOperations` - * 2021-01-01: :class:`StaticSitesOperations` - * 2021-01-15: :class:`StaticSitesOperations` - * 2021-03-01: :class:`StaticSitesOperations` - * 2022-09-01: :class:`StaticSitesOperations` - * 2023-01-01: :class:`StaticSitesOperations` - * 2023-12-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 == '2019-08-01': - from ..v2019_08_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import StaticSitesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import StaticSitesOperations as OperationClass - elif 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 == '2023-12-01': - from ..v2023_12_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: - * 2015-04-01: :class:`TopLevelDomainsOperations` - * 2018-02-01: :class:`TopLevelDomainsOperations` - * 2019-08-01: :class:`TopLevelDomainsOperations` - * 2020-06-01: :class:`TopLevelDomainsOperations` - * 2020-09-01: :class:`TopLevelDomainsOperations` - * 2020-12-01: :class:`TopLevelDomainsOperations` - * 2021-01-01: :class:`TopLevelDomainsOperations` - * 2021-01-15: :class:`TopLevelDomainsOperations` - * 2021-03-01: :class:`TopLevelDomainsOperations` - * 2022-09-01: :class:`TopLevelDomainsOperations` - * 2023-01-01: :class:`TopLevelDomainsOperations` - * 2023-12-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 == '2015-04-01': - from ..v2015_04_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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: - * 2016-08-01: :class:`WebAppsOperations` - * 2018-02-01: :class:`WebAppsOperations` - * 2019-08-01: :class:`WebAppsOperations` - * 2020-06-01: :class:`WebAppsOperations` - * 2020-09-01: :class:`WebAppsOperations` - * 2020-12-01: :class:`WebAppsOperations` - * 2021-01-01: :class:`WebAppsOperations` - * 2021-01-15: :class:`WebAppsOperations` - * 2021-03-01: :class:`WebAppsOperations` - * 2022-09-01: :class:`WebAppsOperations` - * 2023-01-01: :class:`WebAppsOperations` - * 2023-12-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 == '2016-08-01': - from ..v2016_08_01.aio.operations import WebAppsOperations as OperationClass - elif 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 == '2019-08-01': - from ..v2019_08_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from ..v2020_06_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from ..v2020_09_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from ..v2020_12_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2021-01-01': - from ..v2021_01_01.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2021-01-15': - from ..v2021_01_15.aio.operations import WebAppsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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': - 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 == '2023-12-01': - from ..v2023_12_01.aio.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass - elif api_version == '2024-04-01': - from ..v2024_04_01.aio.operations import WorkflowRunActionRepetitionsRequestHistoriesOperations as OperationClass + 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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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` - * 2023-12-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 == '2023-12-01': - from ..v2023_12_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/v2016_03_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py index 9bd4c9b55137..142a0420b39b 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 = "0.0.0" +VERSION = "8.0.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 9bd4c9b55137..142a0420b39b 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 = "0.0.0" +VERSION = "8.0.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 9bd4c9b55137..142a0420b39b 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 = "0.0.0" +VERSION = "8.0.0" 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 9bd4c9b55137..142a0420b39b 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 = "0.0.0" +VERSION = "8.0.0" 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 9bd4c9b55137..142a0420b39b 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 = "0.0.0" +VERSION = "8.0.0" 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 2f51bbdd1412..ee79577ad8a9 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,6 +9,7 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient + """ # PREREQUISITES pip install azure-identity @@ -21,6 +22,8 @@ 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(), @@ -28,15 +31,14 @@ 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 0a019644a0ce..849f45099c01 100644 --- a/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py +++ b/sdk/appservice/azure-mgmt-web/generated_samples/list_operations.py @@ -9,6 +9,7 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient + """ # PREREQUISITES pip install azure-identity @@ -21,20 +22,19 @@ 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 b598657c0c5b..bd9133a8d3a2 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,6 +9,7 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient + """ # PREREQUISITES pip install azure-identity @@ -21,6 +22,8 @@ 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(), @@ -28,13 +31,12 @@ 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 66e20802c38c..a3abe794f444 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,6 +9,7 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient + """ # PREREQUISITES pip install azure-identity @@ -21,6 +22,8 @@ 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(), @@ -28,15 +31,12 @@ 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 efc402091e8f..96d736c55ae7 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,6 +9,7 @@ from azure.identity import DefaultAzureCredential from azure.mgmt.web import WebSiteManagementClient + """ # PREREQUISITES pip install azure-identity @@ -21,6 +22,8 @@ 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(), @@ -28,13 +31,11 @@ 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 35a589a46dfe..d39995f026b9 100644 --- a/sdk/appservice/azure-mgmt-web/setup.py +++ b/sdk/appservice/azure-mgmt-web/setup.py @@ -22,9 +22,11 @@ # 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) diff --git a/sdk/appservice/azure-mgmt-web/tests/conftest.py b/sdk/appservice/azure-mgmt-web/tests/conftest.py index 5bf74943ea0c..b3b7e51fa9e4 100644 --- a/sdk/appservice/azure-mgmt-web/tests/conftest.py +++ b/sdk/appservice/azure-mgmt-web/tests/conftest.py @@ -18,7 +18,7 @@ load_dotenv() -# aovid record sensitive identity information in recordings +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): websitemanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_app_service.py b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_app_service.py index 19b9fc5c954c..5dd58f2a17cd 100644 --- a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_app_service.py +++ b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_app_service.py @@ -1,10 +1,10 @@ # 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. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Current Operation Coverage: # AppServicePlans: 6/27 @@ -14,17 +14,16 @@ import azure.mgmt.web from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtWebSiteTest(AzureMgmtTestCase): def setUp(self): super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.web.WebSiteManagementClient) - @unittest.skip('skip temporarily') + @unittest.skip("skip temporarily") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_app_service_plan(self, resource_group): @@ -33,47 +32,43 @@ def test_app_service_plan(self, resource_group): RESOURCE_GROUP = resource_group.name NAME = "myname" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/put/Create Or Update App Service plan[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "kind": "app", - "location": AZURE_LOCATION, - "sku": { - "name": "P1", - "tier": "Premium", - "size": "P1", - "family": "P", - "capacity": "1" - } + "kind": "app", + "location": AZURE_LOCATION, + "sku": {"name": "P1", "tier": "Premium", "size": "P1", "family": "P", "capacity": "1"}, } - result = self.mgmt_client.app_service_plans.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + result = self.mgmt_client.app_service_plans.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/Get App Service plan[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.get(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/List App Service plans by resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/List App Service plans[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/patch/Patch Service plan[patch] -#-------------------------------------------------------------------------- - BODY = { - "kind": "app" - } - result = self.mgmt_client.app_service_plans.update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + # -------------------------------------------------------------------------- + BODY = {"kind": "app"} + result = self.mgmt_client.app_service_plans.update( + resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/delete/Delete App Service plan[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.delete(resource_group_name=RESOURCE_GROUP, name=NAME) diff --git a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_certificate.py b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_certificate.py index 389562515e95..8385ebfad92b 100644 --- a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_certificate.py +++ b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_certificate.py @@ -1,10 +1,10 @@ # 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. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Current Operation Coverage: # Certificates: 0/6 @@ -16,15 +16,14 @@ from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer from devtools_testutils.fake_credentials import FAKE_LOGIN_PASSWORD -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtWebSiteTest(AzureMgmtTestCase): def setUp(self): super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.web.WebSiteManagementClient) @unittest.skip("Operation returned an invalid status 'Not Found' when create certificate") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @@ -33,47 +32,47 @@ def test_certificate(self, resource_group): RESOURCE_GROUP = resource_group.name NAME = "myname" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/put/Create Or Update Certificate[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "host_names": [ - "ServerCert" - ], - "password": FAKE_LOGIN_PASSWORD # this may not work -- check when tests are active + "location": AZURE_LOCATION, + "host_names": ["ServerCert"], + "password": FAKE_LOGIN_PASSWORD, # this may not work -- check when tests are active } - result = self.mgmt_client.certificates.create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY) + result = self.mgmt_client.certificates.create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/Get Certificate[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.get(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/List Certificates by resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/List Certificates for subscription[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /CertificateRegistrationProvider/get/List operations[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificate_registration_provider.list_operations() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/patch/Patch Certificate[patch] -#-------------------------------------------------------------------------- - BODY = { - "password": FAKE_LOGIN_PASSWORD # this may not work -- check when tests are active - } - result = self.mgmt_client.certificates.update(resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY) + # -------------------------------------------------------------------------- + BODY = {"password": FAKE_LOGIN_PASSWORD} # this may not work -- check when tests are active + result = self.mgmt_client.certificates.update( + resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/delete/Delete Certificate[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.delete(resource_group_name=RESOURCE_GROUP, name=NAME) diff --git a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_static_site.py b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_static_site.py index ee658e6a982b..c5a19f6e71c0 100644 --- a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_static_site.py +++ b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_static_site.py @@ -1,10 +1,10 @@ # 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. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Current Operation Coverage: # StaticSites: 12/26 @@ -14,17 +14,16 @@ import azure.mgmt.web from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer -AZURE_LOCATION = 'eastus2' +AZURE_LOCATION = "eastus2" + class MgmtWebSiteTest(AzureMgmtTestCase): def setUp(self): super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.web.WebSiteManagementClient) - @unittest.skip('skip temporarily') + @unittest.skip("skip temporarily") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_static_site(self, resource_group): @@ -35,174 +34,165 @@ def test_static_site(self, resource_group): PR_ID = "1" DOMAIN_NAME = "mydomain" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Create or update a static site[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "sku": { - "name": "Free", - # "tier": "Free" - }, - # "repository_url": "https://github.com/username/RepoName", - "repository_url": "https://github.com/00Kai0/html-docs-hello-world", - "branch": "master", - # "repository_token": "repoToken123", - "repository_token": GITHUB_TOKEN, - "build_properties": { - "app_location": "app", - "api_location": "api", - "app_artifact_location": "build" - } + "location": AZURE_LOCATION, + "sku": { + "name": "Free", + # "tier": "Free" + }, + # "repository_url": "https://github.com/username/RepoName", + "repository_url": "https://github.com/00Kai0/html-docs-hello-world", + "branch": "master", + # "repository_token": "repoToken123", + "repository_token": GITHUB_TOKEN, + "build_properties": {"app_location": "app", "api_location": "api", "app_artifact_location": "build"}, } - result = self.mgmt_client.static_sites.create_or_update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) + result = self.mgmt_client.static_sites.create_or_update_static_site( + resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Creates or updates the function app settings of a static site.[put] -#-------------------------------------------------------------------------- - BODY = { - "properties": { - "setting1": "someval", - "setting2": "someval2" - } - } + # -------------------------------------------------------------------------- + BODY = {"properties": {"setting1": "someval", "setting2": "someval2"}} # result = self.mgmt_client.static_sites.create_or_update_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, app_settings=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Create or update a custom domain for a static site[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.create_or_update_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Creates or updates the function app settings of a static site build.[put] -#-------------------------------------------------------------------------- - BODY = { - "setting1": "someval", - "setting2": "someval2" - } + # -------------------------------------------------------------------------- + BODY = {"setting1": "someval", "setting2": "someval2"} # result = self.mgmt_client.static_sites.create_or_update_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID, app_settings=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Gets the functions of a particular static site build[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_build_functions(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_build_functions( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get a static site build[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.get_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/List custom domains for a static site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_custom_domains(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_custom_domains( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Gets the functions of a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list_static_site_functions(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get all builds for a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_site_builds(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get details for a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get static sites for a resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_sites_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get all static sites in a subscription[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/patch/Create or update a user for a static site[patch] -#-------------------------------------------------------------------------- - BODY = { - "roles": "contributor" - } + # -------------------------------------------------------------------------- + BODY = {"roles": "contributor"} # result = self.mgmt_client.static_sites.update_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID, static_site_user_envelope=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/List users for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.list_static_site_users(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Get function app settings of a static site build[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.list_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Validate a custom domain for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.validate_custom_domain_can_be_added_to_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Get function app settings of a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.list_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Create an invitation link for a user for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "domain": "happy-sea-15afae3e.azurestaticwebsites.net", - "provider": "aad", - "user_details": "username", - "roles": "admin,contributor", - "num_hours_to_expiration": "1" + "domain": "happy-sea-15afae3e.azurestaticwebsites.net", + "provider": "aad", + "user_details": "username", + "roles": "admin,contributor", + "num_hours_to_expiration": "1", } # result = self.mgmt_client.static_sites.create_user_roles_invitation_link(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_user_roles_invitation_envelope=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/List secrets for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list_static_site_secrets(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Reset the api key for a static site[post] -#-------------------------------------------------------------------------- - BODY = { - "should_update_repository": True, - "repository_token": GITHUB_TOKEN - } - result = self.mgmt_client.static_sites.reset_static_site_api_key(resource_group_name=RESOURCE_GROUP, name=NAME, reset_properties_envelope=BODY) + # -------------------------------------------------------------------------- + BODY = {"should_update_repository": True, "repository_token": GITHUB_TOKEN} + result = self.mgmt_client.static_sites.reset_static_site_api_key( + resource_group_name=RESOURCE_GROUP, name=NAME, reset_properties_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Detach a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.detach_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/patch/Patch a static site[patch] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = {} # result = self.mgmt_client.static_sites.update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a user for a static site[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.delete_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a custom domain for a static site[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.delete_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a static site build[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.static_sites.delete_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a static site[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.delete_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) diff --git a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web.py b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web.py index 717360ffb356..b8a28f2f282b 100644 --- a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web.py +++ b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web.py @@ -1,10 +1,10 @@ # 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. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -40,16 +40,15 @@ from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer from devtools_testutils.fake_credentials import FAKE_LOGIN_PASSWORD -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtWebSiteTest(AzureMgmtTestCase): def setUp(self): super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.web.WebSiteManagementClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_web(self, resource_group): @@ -76,769 +75,995 @@ def test_web(self, resource_group): PR_ID = "myPrId" RESOURCE_HEALTH_METADATA_NAME = "myResourceHealthMetadata" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/put/Create Or Update App Service plan[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "kind": "app", - "location": AZURE_LOCATION, - "sku": { - "name": "P1", - "tier": "Premium", - "size": "P1", - "family": "P", - "capacity": "1" - } + "kind": "app", + "location": AZURE_LOCATION, + "sku": {"name": "P1", "tier": "Premium", "size": "P1", "family": "P", "capacity": "1"}, } - result = self.mgmt_client.app_service_plans.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + result = self.mgmt_client.app_service_plans.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Create or update a static site[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "sku": { - "name": "Basic", - "tier": "Basic" - }, - "repository_url": "https://github.com/username/RepoName", - "branch": "master", - "repository_token": "repoToken123", - "build_properties": { - "app_location": "app", - "api_location": "api", - "app_artifact_location": "build" - } + "location": AZURE_LOCATION, + "sku": {"name": "Basic", "tier": "Basic"}, + "repository_url": "https://github.com/username/RepoName", + "branch": "master", + "repository_token": "repoToken123", + "build_properties": {"app_location": "app", "api_location": "api", "app_artifact_location": "build"}, } - result = self.mgmt_client.static_sites.create_or_update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) + result = self.mgmt_client.static_sites.create_or_update_static_site( + resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/put/Create Or Update Certificate[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "host_names": [ - "ServerCert" - ], - "password": FAKE_LOGIN_PASSWORD # this may not work -- check when tests are active + "location": AZURE_LOCATION, + "host_names": ["ServerCert"], + "password": FAKE_LOGIN_PASSWORD, # this may not work -- check when tests are active } - result = self.mgmt_client.certificates.create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY) + result = self.mgmt_client.certificates.create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Creates or updates the function app settings of a static site.[put] -#-------------------------------------------------------------------------- - BODY = { - "setting1": "someval", - "setting2": "someval2" - } - result = self.mgmt_client.static_sites.create_or_update_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME, app_settings=BODY) + # -------------------------------------------------------------------------- + BODY = {"setting1": "someval", "setting2": "someval2"} + result = self.mgmt_client.static_sites.create_or_update_static_site_function_app_settings( + resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME, app_settings=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Create or update a custom domain for a static site[put] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.create_or_update_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.create_or_update_static_site_custom_domain( + resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/put/Creates or updates the function app settings of a static site build.[put] -#-------------------------------------------------------------------------- - BODY = { - "setting1": "someval", - "setting2": "someval2" - } - result = self.mgmt_client.static_sites.create_or_update_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID, config_name=CONFIG_NAME, app_settings=BODY) + # -------------------------------------------------------------------------- + BODY = {"setting1": "someval", "setting2": "someval2"} + result = self.mgmt_client.static_sites.create_or_update_static_site_build_function_app_settings( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID, config_name=CONFIG_NAME, app_settings=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Approves or rejects a private endpoint connection for a site.[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "private_link_service_connection_state": { - "status": "Approved", - "description": "Approved by admin.", - "actions_required": "" - } + "private_link_service_connection_state": { + "status": "Approved", + "description": "Approved by admin.", + "actions_required": "", + } } - result = self.mgmt_client.web_apps.begin_approve_or_reject_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, private_endpoint_wrapper=BODY) + result = self.mgmt_client.web_apps.begin_approve_or_reject_private_endpoint_connection( + resource_group_name=RESOURCE_GROUP, + name=NAME, + private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, + private_endpoint_wrapper=BODY, + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Update SCM Allowed[put] -#-------------------------------------------------------------------------- - BODY = { - "allow": True - } - result = self.mgmt_client.web_apps.update_scm_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, csm_publishing_access_policies_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"allow": True} + result = self.mgmt_client.web_apps.update_scm_allowed( + resource_group_name=RESOURCE_GROUP, + name=NAME, + basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, + csm_publishing_access_policies_entity=BODY, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Update FTP Allowed[put] -#-------------------------------------------------------------------------- - BODY = { - "allow": True - } - result = self.mgmt_client.web_apps.update_ftp_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, csm_publishing_access_policies_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"allow": True} + result = self.mgmt_client.web_apps.update_ftp_allowed( + resource_group_name=RESOURCE_GROUP, + name=NAME, + basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, + csm_publishing_access_policies_entity=BODY, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_trace_operation( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Analysis[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Analysis[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get FTP Allowed[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_ftp_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_ftp_allowed( + resource_group_name=RESOURCE_GROUP, + name=NAME, + basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get SCM Allowed[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_scm_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_scm_allowed( + resource_group_name=RESOURCE_GROUP, + name=NAME, + basic_publishing_credentials_policy_name=BASIC_PUBLISHING_CREDENTIALS_POLICY_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/Get ResourceHealthMetadata[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.resource_health_metadata.get_by_site(resource_group_name=RESOURCE_GROUP, name=NAME, resource_health_metadata_name=RESOURCE_HEALTH_METADATA_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.resource_health_metadata.get_by_site( + resource_group_name=RESOURCE_GROUP, name=NAME, resource_health_metadata_name=RESOURCE_HEALTH_METADATA_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_trace_operation( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Analysis[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Analysis[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Detectors[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detectors( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Detectors[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detectors( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Analyses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_analyses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Analyses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_analyses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_trace_operation( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get a private endpoint connection for a site.[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_private_endpoint_connection( + resource_group_name=RESOURCE_GROUP, + name=NAME, + private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Diagnostic Category[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_diagnostic_category( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Diagnostic Category[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_diagnostic_category( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get Azure Key Vault app setting reference[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_app_setting_key_vault_reference(resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME, app_setting_key=APP_SETTING_KEY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_app_setting_key_vault_reference( + resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME, app_setting_key=APP_SETTING_KEY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/Get ResourceHealthMetadata[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.resource_health_metadata.get_by_site(resource_group_name=RESOURCE_GROUP, name=NAME, resource_health_metadata_name=RESOURCE_HEALTH_METADATA_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.resource_health_metadata.get_by_site( + resource_group_name=RESOURCE_GROUP, name=NAME, resource_health_metadata_name=RESOURCE_HEALTH_METADATA_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Detectors[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detectors( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Detectors[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detectors( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Analyses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_analyses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Analyses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_analyses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector Response[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector_response( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector Response[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector_response( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_trace_operation( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServiceEnvironments/get/Get Outbound Network Dependencies Endpoints[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.app_service_environments.get_outbound_network_dependencies_endpoints(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.app_service_environments.get_outbound_network_dependencies_endpoints( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_traces( + resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServiceEnvironments/get/Get Inbound Network Dependencies Endpoints[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.app_service_environments.get_inbound_network_dependencies_endpoints(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.app_service_environments.get_inbound_network_dependencies_endpoints( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_traces( + resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get site instance info[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_instance_info( + resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Service Environment Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Diagnostic Category[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_diagnostic_category( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Diagnostic Category[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_diagnostic_category( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.resource_health_metadata.list_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get Azure Key Vault references for app settings[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_app_settings_key_vault_references(resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_app_settings_key_vault_references( + resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector Response[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector_response( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector Response[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.get_site_detector_response( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/List Publishing Credentials Policies[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_basic_publishing_credentials_policies(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_basic_publishing_credentials_policies( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Gets the functions of a particular static site build[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_build_functions(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_build_functions( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Diagnostic Categories[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_diagnostic_categories( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Diagnostic Categories[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_diagnostic_categories( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_traces( + resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detector_responses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detector_responses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_network_traces( + resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get site instance info[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_instance_info( + resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get a static site build[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.get_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.get_static_site_build( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Service Environment Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.resource_health_metadata.list_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get private link resources of a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_private_link_resources(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/List custom domains for a static site[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_custom_domains(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_custom_domains( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Diagnostic Categories[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_diagnostic_categories( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/List App Slot Diagnostic Categories[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_diagnostic_categories( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Gets the functions of a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list_static_site_functions(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detector_responses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/get/Get App Slot Detector Responses[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.list_site_detector_responses( + resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /DeletedWebApps/get/Get Deleted Web App by Location[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.deleted_web_apps.get_deleted_web_app_by_location(azure_location=AZURE_LOCATION, deleted_site_id=DELETED_SITE_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.deleted_web_apps.get_deleted_web_app_by_location( + azure_location=AZURE_LOCATION, deleted_site_id=DELETED_SITE_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get all builds for a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_site_builds(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/Get Certificate[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.get(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get details for a static site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/Get App Service plan[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.get(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.resource_health_metadata.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/List Certificates by resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get static sites for a resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.get_static_sites_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/List App Service plans by resource group[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /DeletedWebApps/get/List Deleted Web App by Location[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.deleted_web_apps.list_by_location(azure_location=AZURE_LOCATION) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /TopLevelDomains/get/Get Top Level Domain[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.top_level_domains.get(name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /TopLevelDomains/get/List Top Level Domains[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.top_level_domains.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a subscription[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.resource_health_metadata.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/get/List Certificates for subscription[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/get/Get all static sites in a subscription[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/get/List App Service plans[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /CertificateRegistrationProvider/get/List operations[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificate_registration_provider.list_operations() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /DomainRegistrationProvider/get/List operations[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.domain_registration_provider.list_operations() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Provider/get/List operations[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.provider.list_operations() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site detector[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site slot detector[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site slot analysis[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site analysis[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site detector[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site slot detector[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_detector( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + detector_name=DETECTOR_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site slot analysis[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Diagnostics/post/Execute site analysis[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.diagnostics.execute_site_analysis( + resource_group_name=RESOURCE_GROUP, + site_name=SITE_NAME, + diagnostic_category=DIAGNOSTIC_CATEGORY, + analysis_name=ANALYSIS_NAME, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/patch/Create or update a user for a static site[patch] -#-------------------------------------------------------------------------- - BODY = { - "roles": "contributor" - } - result = self.mgmt_client.static_sites.update_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID, static_site_user_envelope=BODY) + # -------------------------------------------------------------------------- + BODY = {"roles": "contributor"} + result = self.mgmt_client.static_sites.update_static_site_user( + resource_group_name=RESOURCE_GROUP, + name=NAME, + authprovider=AUTHPROVIDER, + userid=USERID, + static_site_user_envelope=BODY, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation( + resource_group_name=RESOURCE_GROUP, + name=NAME, + network_trace_name=NETWORK_TRACE_NAME, + duration_in_seconds="60", + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.stop_web_site_network_trace( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/List users for a static site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_users(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_users( + resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Get function app settings of a static site build[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_build_function_app_settings( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Validate a custom domain for a static site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.validate_custom_domain_can_be_added_to_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.validate_custom_domain_can_be_added_to_static_site( + resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation( + resource_group_name=RESOURCE_GROUP, + name=NAME, + network_trace_name=NETWORK_TRACE_NAME, + duration_in_seconds="60", + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.stop_web_site_network_trace( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation( + resource_group_name=RESOURCE_GROUP, + name=NAME, + network_trace_name=NETWORK_TRACE_NAME, + duration_in_seconds="60", + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.stop_web_site_network_trace( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Domains/post/Renew an existing domain[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.domains.renew(resource_group_name=RESOURCE_GROUP, domain_name=DOMAIN_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Get function app settings of a static site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.list_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.list_static_site_function_app_settings( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/List backups[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Create an invitation link for a user for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "domain": "happy-sea-15afae3e.azurestaticwebsites.net", - "provider": "aad", - "user_details": "username", - "roles": "admin,contributor", - "num_hours_to_expiration": "1" + "domain": "happy-sea-15afae3e.azurestaticwebsites.net", + "provider": "aad", + "user_details": "username", + "roles": "admin,contributor", + "num_hours_to_expiration": "1", } - result = self.mgmt_client.static_sites.create_user_roles_invitation_link(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_user_roles_invitation_envelope=BODY) + result = self.mgmt_client.static_sites.create_user_roles_invitation_link( + resource_group_name=RESOURCE_GROUP, name=NAME, static_site_user_roles_invitation_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Copy slot[post] -#-------------------------------------------------------------------------- - BODY = { - "target_slot": "staging", - "site_config": { - "number_of_workers": "1", - "http_logging_enabled": True - } - } - result = self.mgmt_client.web_apps.begin_copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"target_slot": "staging", "site_config": {"number_of_workers": "1", "http_logging_enabled": True}} + result = self.mgmt_client.web_apps.begin_copy_production_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation( + resource_group_name=RESOURCE_GROUP, + name=NAME, + network_trace_name=NETWORK_TRACE_NAME, + duration_in_seconds="60", + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/List secrets for a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.list_static_site_secrets(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Reset the api key for a static site[post] -#-------------------------------------------------------------------------- - BODY = { - "should_update_repository": True, - "repository_token": "repoToken123" - } - result = self.mgmt_client.static_sites.reset_static_site_api_key(resource_group_name=RESOURCE_GROUP, name=NAME, reset_properties_envelope=BODY) + # -------------------------------------------------------------------------- + BODY = {"should_update_repository": True, "repository_token": "repoToken123"} + result = self.mgmt_client.static_sites.reset_static_site_api_key( + resource_group_name=RESOURCE_GROUP, name=NAME, reset_properties_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.stop_web_site_network_trace( + resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/post/Detach a static site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.detach_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/List backups[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Copy slot[post] -#-------------------------------------------------------------------------- - BODY = { - "target_slot": "staging", - "site_config": { - "number_of_workers": "1", - "http_logging_enabled": True - } - } - result = self.mgmt_client.web_apps.begin_copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"target_slot": "staging", "site_config": {"number_of_workers": "1", "http_logging_enabled": True}} + result = self.mgmt_client.web_apps.begin_copy_production_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/patch/Patch Certificate[patch] -#-------------------------------------------------------------------------- - BODY = { - "password": FAKE_LOGIN_PASSWORD # this may not work -- check when tests are active - } - result = self.mgmt_client.certificates.update(resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY) + # -------------------------------------------------------------------------- + BODY = {"password": FAKE_LOGIN_PASSWORD} # this may not work -- check when tests are active + result = self.mgmt_client.certificates.update( + resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/patch/Patch a static site[patch] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = {} - result = self.mgmt_client.static_sites.update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) + result = self.mgmt_client.static_sites.update_static_site( + resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/patch/Patch Service plan[patch] -#-------------------------------------------------------------------------- - BODY = { - "kind": "app" - } - result = self.mgmt_client.app_service_plans.update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + # -------------------------------------------------------------------------- + BODY = {"kind": "app"} + result = self.mgmt_client.app_service_plans.update( + resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /TopLevelDomains/post/List Top Level Domain Agreements[post] -#-------------------------------------------------------------------------- - BODY = { - "include_privacy": True, - "for_transfer": False - } + # -------------------------------------------------------------------------- + BODY = {"include_privacy": True, "for_transfer": False} result = self.mgmt_client.top_level_domains.list_agreements(name=NAME, agreement_option=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # //post/VerifyHostingEnvironmentVnet[post] -#-------------------------------------------------------------------------- - BODY = { - "vnet_resource_group": "vNet123rg", - "vnet_name": "vNet123", - "vnet_subnet_name": "vNet123SubNet" - } + # -------------------------------------------------------------------------- + BODY = {"vnet_resource_group": "vNet123rg", "vnet_name": "vNet123", "vnet_subnet_name": "vNet123SubNet"} result = self.mgmt_client.verify_hosting_environment_vnet(parameters=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/Delete a private endpoint connection for a site.[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.begin_delete_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.begin_delete_private_endpoint_connection( + resource_group_name=RESOURCE_GROUP, + name=NAME, + private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a user for a static site[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.delete_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.delete_static_site_user( + resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a custom domain for a static site[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.delete_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.delete_static_site_custom_domain( + resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a static site build[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.static_sites.delete_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + # -------------------------------------------------------------------------- + result = self.mgmt_client.static_sites.delete_static_site_build( + resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Certificates/delete/Delete Certificate[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.certificates.delete(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /StaticSites/delete/Delete a static site[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.static_sites.delete_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/delete/Delete App Service plan[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.app_service_plans.delete(resource_group_name=RESOURCE_GROUP, name=NAME) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web_app.py b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web_app.py index dba604400703..bef1e493696e 100644 --- a/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web_app.py +++ b/sdk/appservice/azure-mgmt-web/tests/disable_test_cli_mgmt_web_app.py @@ -1,10 +1,10 @@ # 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. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Current Operation Coverage: # WebApps: 31/372 @@ -14,17 +14,16 @@ import azure.mgmt.web from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtWebSiteTest(AzureMgmtTestCase): def setUp(self): super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.web.WebSiteManagementClient) - @unittest.skip('skip temporarily') + @unittest.skip("skip temporarily") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_web_app_slot(self, resource_group): # covered: 15 @@ -37,312 +36,308 @@ def test_web_app_slot(self, resource_group): APP_SERVICE_PLAN_NAME = "myappserviceplan" SITE_SOURCE_CONTROL = "web" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/put/Create Or Update App Service plan[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "sku": { - "name": "S1", - "tier": "STANDARD", - "capacity": "1" - }, - "per_site_scaling": False, - "is_xenon": False + "location": AZURE_LOCATION, + "sku": {"name": "S1", "tier": "STANDARD", "capacity": "1"}, + "per_site_scaling": False, + "is_xenon": False, } - result = self.mgmt_client.app_service_plans.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY) + result = self.mgmt_client.app_service_plans.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY + ) service_farm = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Create[put] -#-------------------------------------------------------------------------- - BODY = { - "location": AZURE_LOCATION, - "server_farm_id": service_farm.id, - "reserved": False, - "is_xenon": False, - "hyper_v": False, - "site_config": { - "net_framework_version":"v4.6", - "app_settings": [ - {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"} - ], - "local_my_sql_enabled": False, - "http20_enabled": True - }, - "scm_site_also_stopped": False, - "https_only": False - } - result = self.mgmt_client.web_apps.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY) - result = result.result() - -#-------------------------------------------------------------------------- - # /WebApps/put/CreateSlot[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "properties": { + "location": AZURE_LOCATION, "server_farm_id": service_farm.id, "reserved": False, "is_xenon": False, "hyper_v": False, "site_config": { - "net_framework_version": "v4.6", - "local_my_sql_enabled": False, - "http20_enabled": True + "net_framework_version": "v4.6", + "app_settings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"}], + "local_my_sql_enabled": False, + "http20_enabled": True, }, - "scm_site_also_stopped": False - } + "scm_site_also_stopped": False, + "https_only": False, } - result = self.mgmt_client.web_apps.begin_create_or_update_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_envelope=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY + ) result = result.result() -#-------------------------------------------------------------------------- - # /WebApps/put/CreateConfigurationSlot[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- + # /WebApps/put/CreateSlot[put] + # -------------------------------------------------------------------------- BODY = { - "properties": { - "number_of_workers": 1, - "default_documents": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "net_framework_version": "v3.5", - "php_version": "7.2", - "python_version": "3.4", - "node_version": "", - "power_shell_version": "", - "linux_fx_version": "", - "request_tracing_enabled": False, - "remote_debugging_enabled": False, - "http_logging_enabled": False, - "logs_directory_size_limit": 35, - "detailed_error_logging_enabled": False, - "publishing_username": "$webapp-config-test000002", - "scm_type": "None", - "use32_bit_worker_process": False, - "webSocketsEnabled": True, - "always_on": True, - "app_command_line": "", - "managed_pipeline_mode": "Integrated", - "virtual_applications": [ - { - "virtual_path": "/", - "physical_path": "site\\wwwroot", - "preload_enabled": True - } - ], - "load_balancing": "LeastRequests", - "experiments": { - "ramp_up_rules": [] + "location": AZURE_LOCATION, + "properties": { + "server_farm_id": service_farm.id, + "reserved": False, + "is_xenon": False, + "hyper_v": False, + "site_config": {"net_framework_version": "v4.6", "local_my_sql_enabled": False, "http20_enabled": True}, + "scm_site_also_stopped": False, }, - "auto_heal_enabled": True, - "vnet_name": "", - "local_my_sql_enabled": False, - "ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions_use_main": False, - "http20_enabled": True, - "min_tls_version": "1.0", - "ftps_state": "Disabled", - "preWarmedInstanceCount": 0 - } } - result = self.mgmt_client.web_apps.create_or_update_configuration_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_config=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_envelope=BODY + ) + result = result.result() + + # -------------------------------------------------------------------------- + # /WebApps/put/CreateConfigurationSlot[put] + # -------------------------------------------------------------------------- + BODY = { + "properties": { + "number_of_workers": 1, + "default_documents": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html", + ], + "net_framework_version": "v3.5", + "php_version": "7.2", + "python_version": "3.4", + "node_version": "", + "power_shell_version": "", + "linux_fx_version": "", + "request_tracing_enabled": False, + "remote_debugging_enabled": False, + "http_logging_enabled": False, + "logs_directory_size_limit": 35, + "detailed_error_logging_enabled": False, + "publishing_username": "$webapp-config-test000002", + "scm_type": "None", + "use32_bit_worker_process": False, + "webSocketsEnabled": True, + "always_on": True, + "app_command_line": "", + "managed_pipeline_mode": "Integrated", + "virtual_applications": [ + {"virtual_path": "/", "physical_path": "site\\wwwroot", "preload_enabled": True} + ], + "load_balancing": "LeastRequests", + "experiments": {"ramp_up_rules": []}, + "auto_heal_enabled": True, + "vnet_name": "", + "local_my_sql_enabled": False, + "ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions_use_main": False, + "http20_enabled": True, + "min_tls_version": "1.0", + "ftps_state": "Disabled", + "preWarmedInstanceCount": 0, + } + } + result = self.mgmt_client.web_apps.create_or_update_configuration_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_config=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/CreateSourceControlSlot[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "repo_url": "https://github.com/00Kai0/azure-site-test", - "branch": "staging", - "is_manual_integration": True, - "is_mercurial": False + "repo_url": "https://github.com/00Kai0/azure-site-test", + "branch": "staging", + "is_manual_integration": True, + "is_mercurial": False, } - result = self.mgmt_client.web_apps.begin_create_or_update_source_control_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_source_control=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update_source_control_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_source_control=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetSlot[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetConfigurationSlot[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_configuration_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_configuration_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetSlot[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_slots(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetSourceControlSlot[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_source_control_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_source_control_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/UpdateSlot[patch] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "properties": { - "server_farm_id": service_farm.id, - "reserved": False, - "is_xenon": False, - "hyper_v": False, - "site_config": { - "net_framework_version": "v4.6", - "local_my_sql_enabled": False, - "http20_enabled": True + "location": AZURE_LOCATION, + "properties": { + "server_farm_id": service_farm.id, + "reserved": False, + "is_xenon": False, + "hyper_v": False, + "site_config": {"net_framework_version": "v4.6", "local_my_sql_enabled": False, "http20_enabled": True}, + "scm_site_also_stopped": False, }, - "scm_site_also_stopped": False - } } - result = self.mgmt_client.web_apps.update_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_envelope=BODY) + result = self.mgmt_client.web_apps.update_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_envelope=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/UpdateConfigurationSlot -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "properties": { - "number_of_workers": 1, - "default_documents": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "net_framework_version": "v3.5", - "php_version": "7.2", - "python_version": "3.4", - "node_version": "", - "power_shell_version": "", - "linux_fx_version": "", - "request_tracing_enabled": False, - "remote_debugging_enabled": False, - "http_logging_enabled": False, - "logs_directory_size_limit": 35, - "detailed_error_logging_enabled": False, - "publishing_username": "$webapp-config-test000002", - "scm_type": "None", - "use32_bit_worker_process": False, - "webSocketsEnabled": True, - "always_on": True, - "app_command_line": "", - "managed_pipeline_mode": "Integrated", - "virtual_applications": [ - { - "virtual_path": "/", - "physical_path": "site\\wwwroot", - "preload_enabled": True - } - ], - "load_balancing": "LeastRequests", - "experiments": { - "ramp_up_rules": [] - }, - "auto_heal_enabled": True, - "vnet_name": "", - "local_my_sql_enabled": False, - "ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions_use_main": False, - "http20_enabled": True, - "min_tls_version": "1.0", - "ftps_state": "Disabled", - "preWarmedInstanceCount": 0 - } + "properties": { + "number_of_workers": 1, + "default_documents": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html", + ], + "net_framework_version": "v3.5", + "php_version": "7.2", + "python_version": "3.4", + "node_version": "", + "power_shell_version": "", + "linux_fx_version": "", + "request_tracing_enabled": False, + "remote_debugging_enabled": False, + "http_logging_enabled": False, + "logs_directory_size_limit": 35, + "detailed_error_logging_enabled": False, + "publishing_username": "$webapp-config-test000002", + "scm_type": "None", + "use32_bit_worker_process": False, + "webSocketsEnabled": True, + "always_on": True, + "app_command_line": "", + "managed_pipeline_mode": "Integrated", + "virtual_applications": [ + {"virtual_path": "/", "physical_path": "site\\wwwroot", "preload_enabled": True} + ], + "load_balancing": "LeastRequests", + "experiments": {"ramp_up_rules": []}, + "auto_heal_enabled": True, + "vnet_name": "", + "local_my_sql_enabled": False, + "ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions_use_main": False, + "http20_enabled": True, + "min_tls_version": "1.0", + "ftps_state": "Disabled", + "preWarmedInstanceCount": 0, + } } - result = self.mgmt_client.web_apps.update_configuration_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_config=BODY) + result = self.mgmt_client.web_apps.update_configuration_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_config=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/UpdateSourceControlSlot[patch] -#-------------------------------------------------------------------------- - BODY ={ - "repo_url": "https://github.com/00Kai0/azure-site-test", - "branch": "staging", - "is_manual_integration": True, - "is_mercurial": False + # -------------------------------------------------------------------------- + BODY = { + "repo_url": "https://github.com/00Kai0/azure-site-test", + "branch": "staging", + "is_manual_integration": True, + "is_mercurial": False, } - result = self.mgmt_client.web_apps.update_source_control_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_source_control=BODY) + result = self.mgmt_client.web_apps.update_source_control_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME, site_source_control=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/StartSlot -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.start_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/RestartSlot -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.restart_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/StopSlot -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.stop_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/DeleteSourceControlSlot[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.delete_source_control_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.delete_source_control_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/DeleteSlot[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.delete_slot(resource_group_name=RESOURCE_GROUP, name=NAME, slot=SLOT_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/Delete -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.delete(resource_group_name=RESOURCE_GROUP, name=NAME) - @unittest.skip('skip temporarily') + @unittest.skip("skip temporarily") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_web_app(self, resource_group): # coverd: 16 @@ -353,291 +348,283 @@ def test_web_app(self, resource_group): NAME = "mysitexxyzz" APP_SERVICE_PLAN_NAME = "myappserviceplan" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/put/Create Or Update App Service plan[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "sku": { - "name": "B1", - "tier": "BASIC", - "capacity": "1" - }, - "per_site_scaling": False, - "is_xenon": False + "location": AZURE_LOCATION, + "sku": {"name": "B1", "tier": "BASIC", "capacity": "1"}, + "per_site_scaling": False, + "is_xenon": False, } - result = self.mgmt_client.app_service_plans.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY) + result = self.mgmt_client.app_service_plans.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY + ) service_farm = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Create[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "server_farm_id": service_farm.id, - "reserved": False, - "is_xenon": False, - "hyper_v": False, - "site_config": { - "net_framework_version":"v4.6", - "app_settings": [ - {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"} - ], - "local_my_sql_enabled": False, - "http20_enabled": True - }, - "scm_site_also_stopped": False, - "https_only": False + "location": AZURE_LOCATION, + "server_farm_id": service_farm.id, + "reserved": False, + "is_xenon": False, + "hyper_v": False, + "site_config": { + "net_framework_version": "v4.6", + "app_settings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"}], + "local_my_sql_enabled": False, + "http20_enabled": True, + }, + "scm_site_also_stopped": False, + "https_only": False, } - result = self.mgmt_client.web_apps.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/CreateConfig[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "properties": { - "number_of_workers": 1, - "default_documents": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "net_framework_version": "v3.5", - "php_version": "7.2", - "python_version": "3.4", - "node_version": "", - "power_shell_version": "", - "linux_fx_version": "", - "request_tracing_enabled": False, - "remote_debugging_enabled": False, - "http_logging_enabled": False, - "logs_directory_size_limit": 35, - "detailed_error_logging_enabled": False, - "publishing_username": "$webapp-config-test000002", - "scm_type": "None", - "use32_bit_worker_process": False, - "webSocketsEnabled": True, - "always_on": True, - "app_command_line": "", - "managed_pipeline_mode": "Integrated", - "virtual_applications": [ - { - "virtual_path": "/", - "physical_path": "site\\wwwroot", - "preload_enabled": True - } - ], - "load_balancing": "LeastRequests", - "experiments": { - "ramp_up_rules": [] - }, - "auto_heal_enabled": True, - "vnet_name": "", - "local_my_sql_enabled": False, - "ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions_use_main": False, - "http20_enabled": True, - "min_tls_version": "1.0", - "ftps_state": "Disabled", - "preWarmedInstanceCount": 0 - } + "properties": { + "number_of_workers": 1, + "default_documents": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html", + ], + "net_framework_version": "v3.5", + "php_version": "7.2", + "python_version": "3.4", + "node_version": "", + "power_shell_version": "", + "linux_fx_version": "", + "request_tracing_enabled": False, + "remote_debugging_enabled": False, + "http_logging_enabled": False, + "logs_directory_size_limit": 35, + "detailed_error_logging_enabled": False, + "publishing_username": "$webapp-config-test000002", + "scm_type": "None", + "use32_bit_worker_process": False, + "webSocketsEnabled": True, + "always_on": True, + "app_command_line": "", + "managed_pipeline_mode": "Integrated", + "virtual_applications": [ + {"virtual_path": "/", "physical_path": "site\\wwwroot", "preload_enabled": True} + ], + "load_balancing": "LeastRequests", + "experiments": {"ramp_up_rules": []}, + "auto_heal_enabled": True, + "vnet_name": "", + "local_my_sql_enabled": False, + "ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions_use_main": False, + "http20_enabled": True, + "min_tls_version": "1.0", + "ftps_state": "Disabled", + "preWarmedInstanceCount": 0, + } } - result = self.mgmt_client.web_apps.create_or_update_configuration(resource_group_name=RESOURCE_GROUP, name=NAME, site_config=BODY) + result = self.mgmt_client.web_apps.create_or_update_configuration( + resource_group_name=RESOURCE_GROUP, name=NAME, site_config=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/CreateSourceControl[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "repo_url": "https://github.com/00Kai0/azure-site-test", - "branch": "staging", - "is_manual_integration": True, - "is_mercurial": False + "repo_url": "https://github.com/00Kai0/azure-site-test", + "branch": "staging", + "is_manual_integration": True, + "is_mercurial": False, } - result = self.mgmt_client.web_apps.begin_create_or_update_source_control(resource_group_name=RESOURCE_GROUP, name=NAME, site_source_control=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update_source_control( + resource_group_name=RESOURCE_GROUP, name=NAME, site_source_control=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetConfig -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_configuration(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/GetSourceControl -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_source_control(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/List -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/ListConfig -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_configurations(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/Update[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - # "serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/webapp-linux-plan000002", - "server_farm_id": service_farm.id, - "reserved": False, - "is_xenon": False, - "hyper_v": False, - "site_config": { - "net_framework_version":"v4.6", - "app_settings": [ - {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"} - ], - "local_my_sql_enabled": False, - "http20_enabled": True - }, - "scm_site_also_stopped": False, - "https_only": False + "location": AZURE_LOCATION, + # "serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/webapp-linux-plan000002", + "server_farm_id": service_farm.id, + "reserved": False, + "is_xenon": False, + "hyper_v": False, + "site_config": { + "net_framework_version": "v4.6", + "app_settings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"}], + "local_my_sql_enabled": False, + "http20_enabled": True, + }, + "scm_site_also_stopped": False, + "https_only": False, } result = self.mgmt_client.web_apps.update(resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/UpdateConfig[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "properties": { - "number_of_workers": 1, - "default_documents": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "net_framework_version": "v3.5", - "php_version": "7.2", - "python_version": "3.4", - "node_version": "", - "power_shell_version": "", - "linux_fx_version": "", - "request_tracing_enabled": False, - "remote_debugging_enabled": False, - "http_logging_enabled": False, - "logs_directory_size_limit": 35, - "detailed_error_logging_enabled": False, - "publishing_username": "$webapp-config-test000002", - "scm_type": "None", - "use32_bit_worker_process": False, - "webSocketsEnabled": True, - "always_on": True, - "app_command_line": "", - "managed_pipeline_mode": "Integrated", - "virtual_applications": [ - { - "virtual_path": "/", - "physical_path": "site\\wwwroot", - "preload_enabled": True - } - ], - "load_balancing": "LeastRequests", - "experiments": { - "ramp_up_rules": [] - }, - "auto_heal_enabled": True, - "vnet_name": "", - "local_my_sql_enabled": False, - "ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions": [ - { - "ip_address": "Any", - "action": "Allow", - "priority": 1, - "name": "Allow all", - "description": "Allow all access" - } - ], - "scm_ip_security_restrictions_use_main": False, - "http20_enabled": True, - "min_tls_version": "1.0", - "ftps_state": "Disabled", - "preWarmedInstanceCount": 0 - } + "properties": { + "number_of_workers": 1, + "default_documents": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html", + ], + "net_framework_version": "v3.5", + "php_version": "7.2", + "python_version": "3.4", + "node_version": "", + "power_shell_version": "", + "linux_fx_version": "", + "request_tracing_enabled": False, + "remote_debugging_enabled": False, + "http_logging_enabled": False, + "logs_directory_size_limit": 35, + "detailed_error_logging_enabled": False, + "publishing_username": "$webapp-config-test000002", + "scm_type": "None", + "use32_bit_worker_process": False, + "webSocketsEnabled": True, + "always_on": True, + "app_command_line": "", + "managed_pipeline_mode": "Integrated", + "virtual_applications": [ + {"virtual_path": "/", "physical_path": "site\\wwwroot", "preload_enabled": True} + ], + "load_balancing": "LeastRequests", + "experiments": {"ramp_up_rules": []}, + "auto_heal_enabled": True, + "vnet_name": "", + "local_my_sql_enabled": False, + "ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions": [ + { + "ip_address": "Any", + "action": "Allow", + "priority": 1, + "name": "Allow all", + "description": "Allow all access", + } + ], + "scm_ip_security_restrictions_use_main": False, + "http20_enabled": True, + "min_tls_version": "1.0", + "ftps_state": "Disabled", + "preWarmedInstanceCount": 0, + } } - result = self.mgmt_client.web_apps.update_configuration(resource_group_name=RESOURCE_GROUP, name=NAME, site_config=BODY) + result = self.mgmt_client.web_apps.update_configuration( + resource_group_name=RESOURCE_GROUP, name=NAME, site_config=BODY + ) - #-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/patch/UpdateSourceControl[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "repo_url": "https://github.com/00Kai0/azure-site-test", - "branch": "staging", - "is_manual_integration": True, - "is_mercurial": False + "repo_url": "https://github.com/00Kai0/azure-site-test", + "branch": "staging", + "is_manual_integration": True, + "is_mercurial": False, } - result = self.mgmt_client.web_apps.update_source_control(resource_group_name=RESOURCE_GROUP, name=NAME, site_source_control=BODY) + result = self.mgmt_client.web_apps.update_source_control( + resource_group_name=RESOURCE_GROUP, name=NAME, site_source_control=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.start(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Restart -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.restart(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.stop(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/DeleteSourceControl -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.delete_source_control(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/Delete -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.delete(resource_group_name=RESOURCE_GROUP, name=NAME) @unittest.skip("unavailable") @@ -650,248 +637,240 @@ def test_web_app_backup(self, resource_group): NAME = "mysitexxyzz" APP_SERVICE_PLAN_NAME = "myappserviceplan" -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /AppServicePlans/put/Create Or Update App Service plan[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "sku": { - "name": "B1", - "tier": "BASIC", - "capacity": "1" - }, - "per_site_scaling": False, - "is_xenon": False + "location": AZURE_LOCATION, + "sku": {"name": "B1", "tier": "BASIC", "capacity": "1"}, + "per_site_scaling": False, + "is_xenon": False, } - result = self.mgmt_client.app_service_plans.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY) + result = self.mgmt_client.app_service_plans.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=APP_SERVICE_PLAN_NAME, app_service_plan=BODY + ) service_farm = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Create[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - # "serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/webapp-linux-plan000002", - "server_farm_id": service_farm.id, - "reserved": False, - "is_xenon": False, - "hyper_v": False, - "site_config": { - "net_framework_version":"v4.6", - "app_settings": [ - {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"} - ], - "local_my_sql_enabled": False, - "http20_enabled": True - }, - "scm_site_also_stopped": False, - "https_only": False + "location": AZURE_LOCATION, + # "serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/webapp-linux-plan000002", + "server_farm_id": service_farm.id, + "reserved": False, + "is_xenon": False, + "hyper_v": False, + "site_config": { + "net_framework_version": "v4.6", + "app_settings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14"}], + "local_my_sql_enabled": False, + "http20_enabled": True, + }, + "scm_site_also_stopped": False, + "https_only": False, } - result = self.mgmt_client.web_apps.begin_create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY) + result = self.mgmt_client.web_apps.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, name=NAME, site_envelope=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Approves or rejects a private endpoint connection for a site.[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "private_link_service_connection_state": { - "status": "Approved", - "description": "Approved by admin.", - "actions_required": "" - } + "private_link_service_connection_state": { + "status": "Approved", + "description": "Approved by admin.", + "actions_required": "", + } } # result = self.mgmt_client.web_apps.begin_approve_or_reject_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, private_endpoint_wrapper=BODY) # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Update SCM Allowed[put] -#-------------------------------------------------------------------------- - BODY = { - "allow": True - } - result = self.mgmt_client.web_apps.update_scm_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, csm_publishing_access_policies_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"allow": True} + result = self.mgmt_client.web_apps.update_scm_allowed( + resource_group_name=RESOURCE_GROUP, name=NAME, csm_publishing_access_policies_entity=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/put/Update FTP Allowed[put] -#-------------------------------------------------------------------------- - BODY = { - "allow": True - } - result = self.mgmt_client.web_apps.update_ftp_allowed(resource_group_name=RESOURCE_GROUP, name=NAME, csm_publishing_access_policies_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"allow": True} + result = self.mgmt_client.web_apps.update_ftp_allowed( + resource_group_name=RESOURCE_GROUP, name=NAME, csm_publishing_access_policies_entity=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get FTP Allowed[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_ftp_allowed(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get SCM Allowed[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_scm_allowed(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get a private endpoint connection for a site.[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get Azure Key Vault app setting reference[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_app_setting_key_vault_reference(resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME, app_setting_key=APP_SETTING_KEY) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get the current status of a network trace operation for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get site instance info[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get Azure Key Vault references for app settings[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_app_settings_key_vault_references(resource_group_name=RESOURCE_GROUP, name=NAME, config_name=CONFIG_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/List Publishing Credentials Policies[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.web_apps.get_basic_publishing_credentials_policies(resource_group_name=RESOURCE_GROUP, name=NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.web_apps.get_basic_publishing_credentials_policies( + resource_group_name=RESOURCE_GROUP, name=NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get NetworkTraces for a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get site instance info[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/get/Get private link resources of a site[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.get_private_link_resources(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/List backups[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Copy slot[post] -#-------------------------------------------------------------------------- - BODY = { - "target_slot": "staging", - "site_config": { - "number_of_workers": "1", - "http_logging_enabled": True - } - } - result = self.mgmt_client.web_apps.begin_copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"target_slot": "staging", "site_config": {"number_of_workers": "1", "http_logging_enabled": True}} + result = self.mgmt_client.web_apps.begin_copy_production_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Start a new network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.begin_start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME, duration_in_seconds="60") # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Stop a currently running network trace operation for a site[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME, network_trace_name=NETWORK_TRACE_NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/List backups[post] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/post/Copy slot[post] -#-------------------------------------------------------------------------- - BODY = { - "target_slot": "staging", - "site_config": { - "number_of_workers": "1", - "http_logging_enabled": True - } - } - result = self.mgmt_client.web_apps.begin_copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY) + # -------------------------------------------------------------------------- + BODY = {"target_slot": "staging", "site_config": {"number_of_workers": "1", "http_logging_enabled": True}} + result = self.mgmt_client.web_apps.begin_copy_production_slot( + resource_group_name=RESOURCE_GROUP, name=NAME, copy_slot_entity=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/Delete a private endpoint connection for a site.[delete] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # result = self.mgmt_client.web_apps.begin_delete_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /WebApps/delete/Delete -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.web_apps.begin_delete(resource_group_name=RESOURCE_GROUP, name=NAME) result = result.result() diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_async_test.py new file mode 100644 index 000000000000..f0459946c1c8 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServiceCertificateOrdersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_certificate_orders_list(self, resource_group): + response = self.client.app_service_certificate_orders.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_certificate_orders_list_by_resource_group(self, resource_group): + response = self.client.app_service_certificate_orders.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_test.py new file mode 100644 index 000000000000..0dc975f325ac --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_certificate_orders_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServiceCertificateOrdersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_certificate_orders_list(self, resource_group): + response = self.client.app_service_certificate_orders.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_certificate_orders_list_by_resource_group(self, resource_group): + response = self.client.app_service_certificate_orders.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_async_test.py new file mode 100644 index 000000000000..559844f467ce --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServiceEnvironmentsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_environments_list(self, resource_group): + response = self.client.app_service_environments.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_environments_list_by_resource_group(self, resource_group): + response = self.client.app_service_environments.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_test.py new file mode 100644 index 000000000000..f6552e0bbc08 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_environments_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServiceEnvironmentsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_environments_list(self, resource_group): + response = self.client.app_service_environments.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_environments_list_by_resource_group(self, resource_group): + response = self.client.app_service_environments.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_async_test.py new file mode 100644 index 000000000000..586aa628556f --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServicePlansOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_plans_list(self, resource_group): + response = self.client.app_service_plans.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_app_service_plans_list_by_resource_group(self, resource_group): + response = self.client.app_service_plans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_test.py new file mode 100644 index 000000000000..ee320477e066 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_app_service_plans_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAppServicePlansOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_plans_list(self, resource_group): + response = self.client.app_service_plans.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_app_service_plans_list_by_resource_group(self, resource_group): + response = self.client.app_service_plans.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_async_test.py new file mode 100644 index 000000000000..b89364c4de5e --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_async_test.py @@ -0,0 +1,69 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_get_publishing_user(self, resource_group): + response = await self.client.get_publishing_user() + + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_list_source_controls(self, resource_group): + response = self.client.list_source_controls() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_list_custom_host_name_sites(self, resource_group): + response = self.client.list_custom_host_name_sites() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_get_subscription_deployment_locations(self, resource_group): + response = await self.client.get_subscription_deployment_locations() + + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_list_ase_regions(self, resource_group): + response = self.client.list_ase_regions() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_list_geo_regions(self, resource_group): + response = self.client.list_geo_regions() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_list_skus(self, resource_group): + response = await self.client.list_skus() + + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_async_test.py new file mode 100644 index 000000000000..2c0b13d87521 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementCertificateRegistrationProviderOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_certificate_registration_provider_list_operations(self, resource_group): + response = self.client.certificate_registration_provider.list_operations() + result = [r async for r in response] + assert result diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_test.py new file mode 100644 index 000000000000..9a94bebe6fe7 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificate_registration_provider_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementCertificateRegistrationProviderOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_certificate_registration_provider_list_operations(self, resource_group): + response = self.client.certificate_registration_provider.list_operations() + result = [r for r in response] + assert result diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_async_test.py new file mode 100644 index 000000000000..f336391f296d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementCertificatesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_certificates_list(self, resource_group): + response = self.client.certificates.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_certificates_list_by_resource_group(self, resource_group): + response = self.client.certificates.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_test.py new file mode 100644 index 000000000000..fe90f7335ea9 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_certificates_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementCertificatesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_certificates_list(self, resource_group): + response = self.client.certificates.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_certificates_list_by_resource_group(self, resource_group): + response = self.client.certificates.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_async_test.py new file mode 100644 index 000000000000..601624c8ee3a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementContainerAppsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_container_apps_list_by_subscription(self, resource_group): + response = self.client.container_apps.list_by_subscription() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_container_apps_list_by_resource_group(self, resource_group): + response = self.client.container_apps.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_test.py new file mode 100644 index 000000000000..bfe20c26bd8f --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_container_apps_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementContainerAppsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_container_apps_list_by_subscription(self, resource_group): + response = self.client.container_apps.list_by_subscription() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_container_apps_list_by_resource_group(self, resource_group): + response = self.client.container_apps.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_async_test.py new file mode 100644 index 000000000000..28d8afd631d1 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDeletedWebAppsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_deleted_web_apps_list(self, resource_group): + response = self.client.deleted_web_apps.list() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_test.py new file mode 100644 index 000000000000..8e1170daff2a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_deleted_web_apps_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDeletedWebAppsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_deleted_web_apps_list(self, resource_group): + response = self.client.deleted_web_apps.list() + result = [r for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_async_test.py new file mode 100644 index 000000000000..0dab6c397c80 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDomainRegistrationProviderOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_domain_registration_provider_list_operations(self, resource_group): + response = self.client.domain_registration_provider.list_operations() + result = [r async for r in response] + assert result diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_test.py new file mode 100644 index 000000000000..00ff7027228b --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domain_registration_provider_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDomainRegistrationProviderOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_domain_registration_provider_list_operations(self, resource_group): + response = self.client.domain_registration_provider.list_operations() + result = [r for r in response] + assert result diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_async_test.py new file mode 100644 index 000000000000..03e172d8ce41 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_domains_list(self, resource_group): + response = self.client.domains.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_domains_list_by_resource_group(self, resource_group): + response = self.client.domains.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_test.py new file mode 100644 index 000000000000..4ba3e701e2c3 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_domains_operations_test.py @@ -0,0 +1,33 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_domains_list(self, resource_group): + response = self.client.domains.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_domains_list_by_resource_group(self, resource_group): + response = self.client.domains.list_by_resource_group(resource_group_name=resource_group.name) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_async_test.py new file mode 100644 index 000000000000..a4647ed6003b --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementKubeEnvironmentsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_kube_environments_list_by_subscription(self, resource_group): + response = self.client.kube_environments.list_by_subscription() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_kube_environments_list_by_resource_group(self, resource_group): + response = self.client.kube_environments.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_test.py new file mode 100644 index 000000000000..217e7790f41b --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_kube_environments_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementKubeEnvironmentsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_kube_environments_list_by_subscription(self, resource_group): + response = self.client.kube_environments.list_by_subscription() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_kube_environments_list_by_resource_group(self, resource_group): + response = self.client.kube_environments.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_async_test.py new file mode 100644 index 000000000000..7f4dde32b0fe --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_async_test.py @@ -0,0 +1,55 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementProviderOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_get_available_stacks(self, resource_group): + response = self.client.provider.get_available_stacks() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_get_function_app_stacks(self, resource_group): + response = self.client.provider.get_function_app_stacks() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_list_operations(self, resource_group): + response = self.client.provider.list_operations() + result = [r async for r in response] + assert result + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_get_web_app_stacks(self, resource_group): + response = self.client.provider.get_web_app_stacks() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_get_available_stacks_on_prem(self, resource_group): + response = self.client.provider.get_available_stacks_on_prem() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_test.py new file mode 100644 index 000000000000..61d682ec28c0 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_provider_operations_test.py @@ -0,0 +1,54 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementProviderOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_get_available_stacks(self, resource_group): + response = self.client.provider.get_available_stacks() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_get_function_app_stacks(self, resource_group): + response = self.client.provider.get_function_app_stacks() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_list_operations(self, resource_group): + response = self.client.provider.list_operations() + result = [r for r in response] + assert result + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_get_web_app_stacks(self, resource_group): + response = self.client.provider.get_web_app_stacks() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_get_available_stacks_on_prem(self, resource_group): + response = self.client.provider.get_available_stacks_on_prem() + result = [r for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_async_test.py new file mode 100644 index 000000000000..0f338d3d3074 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementRecommendationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_recommendations_list(self, resource_group): + response = self.client.recommendations.list() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_test.py new file mode 100644 index 000000000000..b78fd8b58dde --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_recommendations_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementRecommendationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_recommendations_list(self, resource_group): + response = self.client.recommendations.list() + result = [r for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_async_test.py new file mode 100644 index 000000000000..9ed0435feb33 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementResourceHealthMetadataOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resource_health_metadata_list(self, resource_group): + response = self.client.resource_health_metadata.list() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_test.py new file mode 100644 index 000000000000..d3edc2291688 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_resource_health_metadata_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementResourceHealthMetadataOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resource_health_metadata_list(self, resource_group): + response = self.client.resource_health_metadata.list() + result = [r for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_async_test.py new file mode 100644 index 000000000000..19c2ff016792 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_async_test.py @@ -0,0 +1,36 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementStaticSitesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_sites_list(self, resource_group): + response = self.client.static_sites.list() + result = [r async for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_static_sites_get_static_sites_by_resource_group(self, resource_group): + response = self.client.static_sites.get_static_sites_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_test.py new file mode 100644 index 000000000000..c1ad797e3100 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_static_sites_operations_test.py @@ -0,0 +1,35 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementStaticSitesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_sites_list(self, resource_group): + response = self.client.static_sites.list() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_static_sites_get_static_sites_by_resource_group(self, resource_group): + response = self.client.static_sites.get_static_sites_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + assert result == [] diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_test.py new file mode 100644 index 000000000000..8c3d3681d773 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_test.py @@ -0,0 +1,75 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagement(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_get_publishing_user(self, resource_group): + response = self.client.get_publishing_user() + + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_source_controls(self, resource_group): + response = self.client.list_source_controls() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_billing_meters(self, resource_group): + response = self.client.list_billing_meters() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_custom_host_name_sites(self, resource_group): + response = self.client.list_custom_host_name_sites() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_get_subscription_deployment_locations(self, resource_group): + response = self.client.get_subscription_deployment_locations() + + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_ase_regions(self, resource_group): + response = self.client.list_ase_regions() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_geo_regions(self, resource_group): + response = self.client.list_geo_regions() + result = [r for r in response] + assert response + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_list_skus(self, resource_group): + response = self.client.list_skus() + + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_async_test.py new file mode 100644 index 000000000000..a4a64399acde --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_async_test.py @@ -0,0 +1,27 @@ +# 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 pytest +from azure.mgmt.web.aio import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementTopLevelDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_top_level_domains_list(self, resource_group): + response = self.client.top_level_domains.list() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_test.py new file mode 100644 index 000000000000..a7110bff019d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_top_level_domains_operations_test.py @@ -0,0 +1,26 @@ +# 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 pytest +from azure.mgmt.web import WebSiteManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestWebSiteManagementTopLevelDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(WebSiteManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_top_level_domains_list(self, resource_group): + response = self.client.top_level_domains.list() + result = [r for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_async_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_async_test.py index f7b3b5ce1ea5..032bf60a30eb 100644 --- a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_async_test.py +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_async_test.py @@ -24,8 +24,13 @@ def setup_method(self, method): async def test_list_by_resource_group(self, resource_group): response = self.client.web_apps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-12-01", ) result = [r async for r in response] assert result == [] - \ No newline at end of file + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_web_apps_list(self, resource_group): + response = self.client.web_apps.list() + result = [r async for r in response] + assert response diff --git a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_test.py b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_test.py index eb9ba3209e62..aeb3dd82d938 100644 --- a/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_test.py +++ b/sdk/appservice/azure-mgmt-web/tests/test_web_site_management_web_apps_operations_test.py @@ -23,8 +23,13 @@ def setup_method(self, method): def test_list_by_resource_group(self, resource_group): response = self.client.web_apps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-12-01", ) result = [r for r in response] assert result == [] - \ No newline at end of file + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_web_apps_list(self, resource_group): + response = self.client.web_apps.list() + result = [r for r in response] + assert response